On 27/12/2012 17:56, Marcos de Carvalho Monteiro wrote:

I'm using ITextSharp version 5.3.5 to PDF signing and annotating. Recently I received just one PDF file which is being corrupted by my annotation procedure specifically from the second page.


I've found the cause. PdfReader has a method "eliminateSharedStreams()". This method duplicates any content streams that are shared between pages. I think it was introduced for a specific reason: if you have shared streams and you want to change something to one page, the change will also occur in all the other pages that share the stream.

When using append mode and more specifically when signing, you don't want to change anything to the content. In this case, the method doesn't make any sense.

I'll look at the SVN repository when it was introduced, and I may make the method optional (it not being called by default).
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to