galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.15k stars 170 forks source link

Password protection with ownerPassword only #220

Closed rcwwilliams closed 6 years ago

rcwwilliams commented 6 years ago

Hi

The feature to password protect a PDF document using recrypt is great - thank you.

Is it possible to recrypt a document so it can be opened without a password, but with the activities specified in the userProtectionFlag being password protected?

Thanks

Kind regards

Robin

chunyenHuang commented 6 years ago

You can try to set the userPassword to ''. And set password and ownerPassword to the one you want.

It should allow you to open the pdf file without password and require password for editing.

rcwwilliams commented 6 years ago

Brilliant - thanks so much John / Chunyen.