Hi,

i try to implement the following steps:
1) reading a signed pdf
2) adding a javascript code to the pdf and
3) printing the pdf to the default printer.

...
try {
  PdfReader reader = new PdfReader(pdfByteArray); //pdfByteArray represents
the content of pdf file
  PdfStamper stamper = new PdfStamper(reader, outputStream);
  stamper.addJavaScript("this.print(false);");
  stamper.close();
} catch (Exception e) {...}
...

After executing the java code the signed document is printed but the
signature is not valid. If i don't add the javascript code the pdf is
displayed by acrobat reader within the browser but the signature is also
invalid! (Error message: byte range of the signature is not valid.)

My questions:
1) How is it possible to read a signed pdf document without destroying the
signature?
2) Is there a possibility to add javascript code so that the signature keeps
valid?

Thanks for your hints,
Tom
-- 
View this message in context: 
http://www.nabble.com/Problem-with-signed-PDF-tf4554569.html#a12997705
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to