Merge multiple PDF Files into a single PDF document supporting three output formats: Buffer, Stream, New file on disk.
PDFMerge uses PDFtk to merge the documents and as such it is a requirement in order for PDFMerge to work. It will work on any platform supported by PDFtk.
Starting from v1.0.0 a requirement of Node >= 4.0.0 is required as well. If you are stuck in the dark ages then
npm i firstname.lastname@example.org should still work.
Download and run the Installer.
apt-get install pdftk
files is expected to be an array of files (must be full path for each respective file) or objects.
The file object have the follow options:
fileFull path of PDF file
inputPwPassword to decrypt a PDF Optional!
libPathShould only be provided if pdftk is not in your
Stream, and path to a new file are accepted. Optional!
execOptionsThis is an optional string where you can pass additional argument to pdftk, for example compress. For the complete list see the docu of the pdftk
const PDFMerge = ;const files =`/1.pdf``/2.pdf`file: `/protected.pdf` inputPw: '_SeCrEt_';//Buffer (Default);//Stream;//Save as new file;