MergePDFs
Merge multiple PDF Files into a single PDF document by providing direct path array or folder path
Syntax
appendPdf;
filesPathArray is expected to be an array of files (must be full path for each respective file).
appendPdfFromFolder;
folderPath is expected to be an path of folder containing all the files (must be full path for each respective folder).
Examples
const mergePDFs = require; const filesPathArray = [ `${__dirname}/1.pdf`, `${__dirname}/2.pdf`];//Save as new filemergePDFs.appendPdf; const folderPath = `${__dirname}/allPdf`;//Save as new filemergePDFs.appendPdfFromFolder;