|
I'm trying to get a handle on the implications of using the freeReader() call of PdfCopy. If I call this, can I not add more pages from the 'freed' reader to the same PdfCopy instance? Or is it safe to call:
pdfCopy.freeReader(myReader);
PdfImportedPage imported = pdfCopy.getImportedPage(myReader, 1);
pdfCopy.addPage(imported);
pdfCopy.freeReader(myReader);
PdfImportedPage imported = pdfCopy.getImportedPage(myReader, 2);
pdfCopy.addPage(imported);
Obviously, in a real app, these calls would not be in the same block of code.
This is kind of a long way of asking if it wouldn't be better to just implicitly call freeReader() in addPage() if the reader is different from the currentReader. I suspect that this would have performance implications for readers opened in partial mode, but I wanted to check my thinking.
Thanks, - K
|
------------------------------------------------------------------------------
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/ 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/
