Eric,

use the PDFStamper constructor exposing the append flag and set it to true.

If you manipulate a PDF with append=false (the default), iText may
reorganize existing PDF objects and throw away unused ones; additionally it
does replace the crossreferences. This changes the PDF in such a way that
signatures are invalidated.

Regards,   Michael.


Eric Lou wrote:
> 
> i tried to add an annotation to a signed pdf (empty_signed.pdf) and save
> as empty_signed_tested.pdf
> when i use acrobat reader 8 to open it, it shows MyPicture1.jpeg.
> 
> the code i use to add annotation as following:
> 
>         PdfReader reader = new PdfReader("F:/temp/pdf/empty_signed.pdf");
>         FileOutputStream os = new
> FileOutputStream("F:/temp/pdf/empty_signed_tested.pdf");
>         PdfStamper stamper = new PdfStamper(reader, os);
>         [...]
> 
> am i using the wrong way?
> 

-- 
View this message in context: 
http://old.nabble.com/PdfAnnotation.createText-makes-a-signed-pdf-got-unexpected-byte-range-values--tp26586737p26588087.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to