voyent
Decrypt Automatic  XML
Forum Index -> ICEpdf General
Author Message
keviinkwok

Joined: 30/May/2019 13:37:29
Messages: 5
Offline


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
patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1979
Offline


The swing viewer RI will popup dialog if a password is required to decrypt and view the file. However I'm guessing you would like to do this programatically and you can find some more info here, https://www.icesoft.org/wiki/display/PDF/Implementing+a+SecurityCallback

[Email]
keviinkwok

Joined: 30/May/2019 13:37:29
Messages: 5
Offline


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
[Thumb - Capture 2.PNG]
 Filename Capture 2.PNG [Disk] Download
 Description Result
 Filesize 4 Kbytes
 Downloaded:  4 time(s)

[Thumb - Capture 3.PNG]
 Filename Capture 3.PNG [Disk] Download
 Description Code
 Filesize 24 Kbytes
 Downloaded:  5 time(s)

patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1979
Offline


Could you post a some more source code of how your are using out API. It looks like you are using JFrame and likely our component example?
[Email]
keviinkwok

Joined: 30/May/2019 13:37:29
Messages: 5
Offline


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).
[Thumb - Capture 6.PNG]
 Filename Capture 6.PNG [Disk] Download
 Description Library
 Filesize 3 Kbytes
 Downloaded:  1 time(s)

 Filename Capture 5.PNG [Disk] Download
 Description picture 1
 Filesize 28 Kbytes
 Downloaded:  0 time(s)

keviinkwok

Joined: 30/May/2019 13:37:29
Messages: 5
Offline


the next picture
[Thumb - Capture 8.PNG]
 Filename Capture 8.PNG [Disk] Download
 Description picture 2
 Filesize 30 Kbytes
 Downloaded:  1 time(s)

[Thumb - Capture 7.PNG]
 Filename Capture 7.PNG [Disk] Download
 Description picture 2
 Filesize 33 Kbytes
 Downloaded:  2 time(s)

keviinkwok

Joined: 30/May/2019 13:37:29
Messages: 5
Offline


.
 
Forum Index -> ICEpdf General
Go to:   
Powered by JForum 2.1.7ice © JForum Team