Soji 1 Posted April 5, 2019 (edited) I have a requirement to encrypt a PDF file with password. Does anyone have experience doing this with any libraries? (I am looking for a free library at this moment.) Edited April 5, 2019 by Soji Share this post Link to post
stijnsanders 37 Posted April 5, 2019 You should check if synpdf can do it: https://github.com/synopse/SynPDF 1 Share this post Link to post
Soji 1 Posted April 5, 2019 Just now, stijnsanders said: You should check if synpdf can do it: https://github.com/synopse/SynPDF I already downloaded that tried. But it seems like it can only generate the PDF. I haven't find anyway to load an existing PDF file and just encrypt it. I looked into the help/source and it looks like it is not possible to load an existing PDF file and make changes with that unit. Share this post Link to post
HolgerX 7 Posted April 5, 2019 Hmm.. Take a look to ghostscript: https://stackoverflow.com/questions/12921006/password-protected-pdf-using-ghostscript/12929181 1 Share this post Link to post
David Heffernan 2353 Posted April 5, 2019 I don't think that this is encryption. And in any case, it's probably worth knowing that the password can be removed trivially. Share this post Link to post
Guest Posted April 5, 2019 There are several prjects/tools out there for that, mostly pricey stuff built on other stuff. Also check with TJoe when it comes to PDF handling. Share this post Link to post
Fritzew 51 Posted April 5, 2019 2 hours ago, Dany Marmur said: There are several prjects/tools out there for that, mostly pricey stuff built on other stuff. Also check with TJoe when it comes to PDF handling. I Would also tend to @tjoe if it comes to Pdf Questions. I don't think you will find a more competent person if it comes to Delphi and PDF https://uberpdf.org 1 Share this post Link to post