Page 1 of 1

How to open encrypted pdf files sending password through delphi?

Posted: Mon Sep 27, 2021 2:44 pm
by claudioprv
Hi developer,
First, congratulations on developing this component.
I would like to know if it is possible for me to open a PDF document encrypted with password passing the password in run-time, without the need for the user to type the password.
Example: The user will open the PDF file with password but he cannot know the password, I will pass the password through Delphi, so I would avoid opening the box to enter the password.

Something like Chromium1.LoadURL(url, pdfpassword);
or some pdf.password property

Thank you in advance,
Cláudio.

Re: How to open encrypted pdf files sending password through delphi?

Posted: Mon Sep 27, 2021 6:08 pm
by salvadordf
Hi,

I saw your issue in GitHub but I'm very busy these days and I haven't tried to open a password protected PDF file yet.

If you have any sample file please post a link here and I'll try to open it as soon as I can.

Re: How to open encrypted pdf files sending password through delphi?

Posted: Tue Sep 28, 2021 3:09 am
by claudioprv
Video explaining what I need to do if possible -> https://youtu.be/-NSMPVi4uzw
Sample Pdf -> https://drive.google.com/file/d/1AvwEX5Mwni7DSQYXOKVVrRiN09QD4MJx/view?usp=sharing

I used a component to open the example PDF using the pdfium library, it is good, but the component has serious bugs. Using chromium I have a much better result and no bugs.

Thanks.

Re: How to open encrypted pdf files sending password through delphi?

Posted: Tue Sep 28, 2021 2:29 pm
by salvadordf
Thanks for the video and the file.

I tried to open that file but that password input box is created by PDFium, which is the PDF reader used by Chromium.

Please read the GitHub issue for more details.

Re: How to open encrypted pdf files sending password through delphi?

Posted: Tue Sep 28, 2021 11:24 pm
by claudioprv
Thanks for your attention, I also made several attempts to debug the source to see if I could find an easy way to make an implementation but I couldn't.
I will try other alternatives, thank you very much.