Hi,

I am using itext 2.0.4 to split PDFs with multiple pages into single pages.

I am finding that the size of single page PDF is unexpectedly large. The 
initial PDF is 50MB, and most of the pages are around 10MB. The PDF has 
750 pages, so the resulting size is considerably larger than the 
original (7500MB!).

It is only some PDFs that are affected. I was wondering if anyone has 
seen similar problems, or has any idea what might be happening.

The code I am using is as follows (error handling ommitted).
...
PdfReader reader = new PdfReader(pdfInputStream);
int endPage = reader.getNumberOfPages();

for (int currentPage = 1; currentPage <= endPage; currentPage++) {
  Document document = new 
Document(reader.getPageSizeWithRotation(currentPage));
  PdfSmartCopy copy = new PdfSmartCopy(document, 
getSinglePdfOutputStream(currentPage));
  copy.setFullCompression();
  document.open();
  PdfImportedPage page = copy.getImportedPage(reader, currentPage);
  copy.addPage(page);
 document.close();
}
...

Regards,

Will.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to