The page size seems to vary with the size of the of the original PDF. If I extract 5 pages with Acrobat, then the size of the pages after splitting with itext is about 1MB. If I extract 50 pages with Acrobat, then split those with itext, then the page size is about 3MB.
I am using itext 2.0.4. I wondered if there is something odd about the original PDF. Has anyone else experienced anything similar? Thanks, Will. -------- Original Message -------- Subject: Splitting into single pages size problem Date: Tue, 21 Aug 2007 16:08:59 +0100 From: Will Simpson <[EMAIL PROTECTED]> To: [email protected] 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. -- Will Simpson, Senior Software Engineer, Semantico, Floor 1, 21-23 Dyke Road, Brighton BN1 3FE <http://www.semantico.com/> <mailto:[EMAIL PROTECTED]> <tel:+44-1273-358228> <fax:+44-1273-723232> ------------------------------------------------------------------------- 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/
