merge-multiple-pdfs

1.0.3 • Public • Published

MergePDFs

Merge multiple PDF Files into a single PDF document by providing direct path array or folder path

Syntax

appendPdf(filesPathArray, outputPath);

filesPathArray is expected to be an array of files (must be full path for each respective file).

appendPdfFromFolder(folderPath, outputPath);

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('merge-multiple-pdfs');
 
const filesPathArray = [
    `${__dirname}/1.pdf`,
    `${__dirname}/2.pdf`
];
//Save as new file
mergePDFs.appendPdf(filesPathArray, `${__dirname}/output.pdf`);
 
 
const folderPath = `${__dirname}/allPdf`;
//Save as new file
mergePDFs.appendPdfFromFolder(folderPath, `${__dirname}/output.pdf`);

/merge-multiple-pdfs/

    Package Sidebar

    Install

    npm i merge-multiple-pdfs

    Weekly Downloads

    7

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    2.65 kB

    Total Files

    3

    Last publish

    Collaborators

    • rv27