wubzz / pdf-merge

Merge multiple PDF Files into a single PDF document
127 stars 32 forks source link

Encrypt with password #37

Closed grachet closed 4 years ago

grachet commented 4 years ago

Hi, I try to add a password to the final document. I think it will be in execOption but can you help me ?

PDFMerge(filesPath, {execOptions : 'password'}) .then((buffer) => { }) .catch((err) => { })

wubzz commented 4 years ago

execOptions is sent directly to PDFtk. You can read their examples here:

https://www.pdflabs.com/docs/pdftk-man-page/ https://www.pdflabs.com/docs/pdftk-cli-examples/