Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes iText: password protect a signed pdf file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "iText: password protect a signed pdf file " Watch "iText: password protect a signed pdf file " New topic
Author

iText: password protect a signed pdf file

pavithra murthy
Ranch Hand

Joined: Feb 06, 2009
Posts: 56
hello friend ,

i had written a code to digitally sign a pdf document using itext jar. Once digitally signed ,signature is validated and present in all the pdf pages.

now thing is i am password protecting the pdf in which input i am giving it as signed pdf document ... once i open with the password ,signature is becoming invalid . I think since its getting protected its not able to find the PKC and keystore where i have placed it in the folder where my program is written .
Please could anyone help me out .




-->PdfEncryptor.encrypt(reader,new FileOutputStream("encrypted.pdf"),"Hello".getBytes(),"World".getBytes(),PdfWriter.AllowPrinting | PdfWriter.AllowCopy,false);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: iText: password protect a signed pdf file