简体   繁体   中英

Password protect a generated PDF from page

I'm currently using PHP for retrieving data and the JavaScript print function for my inventory reports and my staff saves it in pdf form. This is the sample output:

在此处输入图片说明

Everything works perfectly but I have a security issue. I want my staff to not be able to open the pdf, thus securing it with a password.

Is there, by any chance, a way to do this? Like whenever they click a button, instead of the print dialog box (ctrl+ P) opening, it will directly open a save to dialog box and it will automatically have a password so that I can be the only one who can view and print it.

Or is there a PDF library for this?

Any help would be much appreciated.

Found a library and it works as expected.

http://www.html2pdf.fr/en/download

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM