eliminateSharedStreams() was introduced to solve a problem at the time that was the same stream duplicated in all the pages. iText evolved quite a bit since then and this has to revisited, mainly to eliminate the shared streams only at the time of writing and only if it's needed.
Paulo > -----Original Message----- > From: mkl [mailto:m...@wir-sind-cool.org] > Sent: Monday, December 14, 2009 7:59 AM > To: itext-questions@lists.sourceforge.net > Subject: Re: [iText-questions] Problem with > PdfReader.eliminateSharedStreams() in concert with appending > PdfStamper > > > Paulo, > > > Paulo Soares wrote: > > > > Yep, that's a bug that only occurs in append mode. > > > > As I mentioned in another posting here, this bug does not occur when > instantiating the PdfReader using a > RandomAccessFileOrArray(). I'm in the > fortunate position that I can easily switch to using that constructor. > Others might not be, though. > > I'm interested, though, what the reason was for introducing that > eliminateSharedStreams() call in readPdf in the first place. > > On the one hand, considering that eliminateSharedStreams() > does nothing when > called for one page documents, its call here seems to have > been introduced > to separate the content streams for different pages (e.g. > when a document > contains many forms differing only in the values entered) to > be able to > manipulate them individually. > > On the other hand that reasoning would not differ for > documents read with > the constructor that calls readPdfPartial() instead of readPdf()... > > The check-in comment accompanying the introduction of that call > unfortunately doesn't explain anything. > > Regards, Michael. Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message.
------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net 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/