{"id":20297157,"url":"https://github.com/bompi88/pdfmerger","last_synced_at":"2025-04-11T12:14:59.890Z","repository":{"id":57321539,"uuid":"85605478","full_name":"bompi88/pdfmerger","owner":"bompi88","description":"Node module that uses the Pdfbox library to merge PDF files into a single PDF file.","archived":false,"fork":false,"pushed_at":"2017-10-11T21:19:52.000Z","size":6617,"stargazers_count":6,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T13:08:23.654Z","etag":null,"topics":["combine","merge","node","nodejs","npm-package","pdf","pdfbox","pdfmerger","stream"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/pdfmerger","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bompi88.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-20T17:21:16.000Z","updated_at":"2022-12-06T19:52:30.000Z","dependencies_parsed_at":"2022-08-25T21:01:31.076Z","dependency_job_id":null,"html_url":"https://github.com/bompi88/pdfmerger","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bompi88%2Fpdfmerger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bompi88%2Fpdfmerger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bompi88%2Fpdfmerger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bompi88%2Fpdfmerger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bompi88","download_url":"https://codeload.github.com/bompi88/pdfmerger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248399183,"owners_count":21097296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["combine","merge","node","nodejs","npm-package","pdf","pdfbox","pdfmerger","stream"],"created_at":"2024-11-14T15:44:13.527Z","updated_at":"2025-04-11T12:14:59.868Z","avatar_url":"https://github.com/bompi88.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## pdfmerger\n\n_pdfmerger_ combines multiple PDF-files into a single PDF-file. It is a node module that utilizes the\n[Apache PDFBox Library](http://pdfbox.apache.org), which the required functionality are distributed along with this module. The only requirement for this module to run, is having Java 6 or higher in the path.\n\nThis package is inspired from karuppiah's [easy-pdf-merge](https://github.com/karuppiah7890/easy-pdf-merge), but instead of using a callback approach, this module returns a stream interface.\n\n## Usage:\n\nThe module can merge a provided list of PDFs, or merge all PDFs present in a directory of your choice, in alphanumeric order. You can set a file path, which will write the file to that location, or just handle the stream yourselves.\n\n``` javascript\nvar pdfmerger = require('pdfmerger');\n\n// Combining pdfs by using file paths\n\nvar pdfs = [\n  '/path/to/pdf1.pdf',\n  '/path/to/pdf2.pdf'\n];\n\nvar pdfStream = pdfmerger(pdfs);\n\nvar writeStream = fs.createWriteStream('path/to/combined.pdf');\npdfStream.pipe(writeStream);\n\n// write the output to a file\n\npdfmerger(pdfs, '/path/to/combined.pdf');\n\n// combine all pdfs in a directory\n\npdfmerger('/path/to/directory', '/path/to/combined.pdf');\n\n// set max java heap limit and initial heap size in megabytes\n\npdfmerger('/path/to/directory', '/path/to/combined.pdf', {\n  maxHeap: 512,\n  minHeap: 32\n});\n\n// Stream events\n\npdfStream.on('data', function(data) {\n\n});\n\npdfStream.on('error', function(error) {\n\n});\n\npdfStream.on('close', function(code) {\n\n});\n\n```\n\n## Issues and Feature Requests\n\nIf there are issues or feature requests, go to the [github issues page of the module](https://github.com/bompi88/pdfmerger/issues).\n\n## Licenses\n\n### Project License - Apache License 2.0\n\nThe license is inherited from the PDFBox project.\n\n```\nCopyright 2017 Bjørn Bråthen\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n### Pdfs used for testing\n\nres/pdf1.pdf - the first 20 pages of [_Making260_](https://github.com/making360/making360) - This resource is licensed under [Creative Commons - Attribution-NonCommercial-ShareAlike-4.0 International](http://creativecommons.org/licenses/by-nc-sa/4.0/).\n\nres/pdf2.pdf - the first 20 pages of [TypeScript Deep Dive](https://github.com/basarat/typescript-book), by Barasat Ali Syed - [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbompi88%2Fpdfmerger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbompi88%2Fpdfmerger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbompi88%2Fpdfmerger/lists"}