Is there a size limitation to a PdfCopy object and/or PdfSmartCopy object?  I 
have tried both, as suggested in iText in Action, second edition, but get the 
same error.

I am concatenating multiple PDF files and I am now encountering an 
Out-Of-Memory error as I import pages using code similar to the following:

I have an input of PdfReader[] which contains 16 PdfReader objects with 
approximately 457 pages when combined.

Document document = new Document();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfCopy copy = new PdfCopy(document, baos);
document.open();

PdfReader reader = null;

for (int x = 0; x < PdfReaderArray.length; x++) {
    reader = PdfReaderArray[x];

    for (int page = 0; page < reader.getNumberOfPages(); ) {
      copy.addPage(copy.getImportedPage(reader, ++page);
    }

}

Any assistance is appreciated.


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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