I wonder to how to decrypt pdf by password?
i need to decrypt a pdf when i open it without asking any password.
can you give me a solution for this problem ?
Thankyou for your answer.
But i have tried the code and the results of the document are not open.
Can you give me a example how to use the code ? maybe i use it wrong
yes im using java for my program, and i use two library to process the pdf (icepdf-viewer-4.3.3.jar and icepdf-core-4.3.3.jar).
if i using this code (see picture 1) i can use it normally.
but when I want to open PDF which has an open password automatically (the password is set into the program) I even experience problems (the picture 2 is on next reply).
Since you are already using the SwingController a securityCallback handler is already setup for you, there should be no need to sit it directly on the doucment class.
When the file is opened in the viewer there should be a dialog that will show up to allow the user to type in a password. You are using a pretty old version of the library which may not support the documents encryption level. I would recommend updating to at least version 5, current is 6.3.x.
If you have a publicly viewable test file, I can try it and let you know if there is any problems decrypting the file.
I tried the field with the 6.3.3-SNAPSHOT and it loaded fine in our viewer reference implementation. Keep me posted if you getting working on your end.