1.0.2 • Published 6 years ago
pdfmerge v1.0.2
PDFMergeJS
Merge PDF files into one.
What's new
- PDFMerge is now promise based.
- Better error handling.
Requirements
- Python 3 or above
- PyPDF2 >= 1.21
To install PyPDF2, run pip install PyPDF2>=1.21
Usage
- Install the module using
npm install pdfmerge Require the module
let PDFMerge = require('pdfmerge')PDFMerge(inputFiles, outputFile)-function- inputFiles -
Array: An Array of all the input files - outputFile -
String: String containing the output filename
- inputFiles -
Example code:
PDFMerge(['input-1.pdf', 'input-2.pdf'], 'output.pdf').then(function(done){ console.log(done) // success }).catch(function(error){ console.error(error.code) // Logs error code if an error occurs })error.codereturns :404- If any or all of the input files are not found1- If PyPDF2 is not installed