Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
pdf-merge-multistamp
Advanced tools
Merge PDF files into a single PDF document, with multistamp supported
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 pdf-merge@0.1.1
should still work.
Download and run the Installer.
apt-get install pdftk
https://www.pdflabs.com/docs/install-pdftk-on-redhat-or-centos/
PDFMerge(files
, options
)
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:
file
Full path of PDF fileinputPw
Password to decrypt a PDF Optional!options
:
libPath
Should only be provided if pdftk is not in your PATH
Optional!output
Defaults to Buffer
. Values Buffer
, Stream
, and path to a new file are accepted. Optional!multistamp
Should only be provided if multistamp is used Optional!getMeta
Should only be provided to get single file meta Optional!execOptions
This is an optional string where you can pass additional argument to pdftk, for
example compress. For the complete list see the docu of the pdftkconst PDFMerge = require('pdf-merge');
const files = [
`${__dirname}/1.pdf`,
`${__dirname}/2.pdf`,
{file: `${__dirname}/protected.pdf`, inputPw: '_SeCrEt_'}
];
//Buffer (Default)
PDFMerge(files)
.then((buffer) => {...});
//Stream
PDFMerge(files, {output: 'Stream'})
.then((stream) => {...});
//Save as new file
PDFMerge(files, {output: `${__dirname}/3.pdf`})
.then((buffer) => {...});
const PDFMerge = require('pdf-merge');
const files = [
`${__dirname}/1.pdf`
];
//Applies each page of the stamp PDF to the corresponding page of the input PDF
PDFMerge(files, {multistamp: `${__dirname}/stamp.pdf`, output: `${__dirname}/3.pdf`})
.then((buffer) => {...});
const PDFMerge = require('pdf-merge');
const files = [
`${__dirname}/1.pdf`
];
//Applies each page of the stamp PDF to the corresponding page of the input PDF
PDFMerge(files, {getMeta: true})
.then((meta) => {...});
FAQs
Merge PDF files into a single PDF document, with multistamp supported
The npm package pdf-merge-multistamp receives a total of 2 weekly downloads. As such, pdf-merge-multistamp popularity was classified as not popular.
We found that pdf-merge-multistamp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.