Concerning your wish to change a signed document, you might want to read the 
Adobe Whitepaper on "Adobe Acrobat 9 Digital Signatures, Changes and 
Improvements" 
(http://www.adobe.com/devnet/reader/articles/reader_compatibility/readercomp_digitalsignatures.pdf),
 especially the sections on allowed changes for certified documents and for 
signed but uncertified ones. Thereafter you might want to reconsider your 
objective as "Changing page content" is always to be found in the "Disallowed" 
column. Editing annotations or form field values is allowed, though, in all but 
certain certified documents, so this might be an option for you.

Regards,   Michael.

-----Original Message-----
From: pep_manel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2008 2:27 PM
To: [email protected]
Subject: [iText-questions] Troubles with adding extra content to an existing 
SIGNED PDF file


If I add a new page to a signed pdf, then the signature becomes INVALID.

My code is:
-------------------------------------------------------------------
  PdfReader reader = new PdfReader("test_signed_document.pdf");

  // Append mode
  PdfStamper stamp = new PdfStamper(reader, new 
FileOutputStream("test_signed_output_document.pdf"), '\0', true);

  // **** adding an extra page ****
  stamp.insertPage(1, PageSize.A4);
  PdfContentByte over = stamp.getOverContent(1);

  over.beginText();
  BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, 
BaseFont.EMBEDDED);
  over.setFontAndSize(bf, 18);
  over.showTextAligned(Element.ALIGN_LEFT, "*** ADD A NEW PAGE ***", 30, 600, 
0);
  over.endText();

  stamp.close();
-------------------------------------------------------------------

Is there a way to do this keeping the signature valid?

Thanks.
-- 
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to