I am using PDF to be rendered in my application, for various other information of page level (creating swf, xml etc for different o/p format) page level spliting is done and processed.
Environment is Linux (Fedora 8).
Final PDF is recreated using the split PDF but there is drastic increase in size for a few PDF where similar font is used over a large no. of pages.
Using iText and PDFTK output is not satisfactory…
It simply adds the split PDF and final output is same size of individual PDF combined together.
I think optimization and/or shared resources duplication is what I am missing here…
PdfTk uses a mighty old (and no longer supported) version of iText. When concatenating PDFs, it uses the
PdfCopyclass. You should use a recent version of iText and PdfSmartCopy.PdfSmartCopystores hashes of all the objects that are added to the new document. This allows iText to reuse objects that already exist.For more info, read chapter 6 of the book I wrote about iText: http://www.manning.com/lowagie2/samplechapter6.pdf (search for PdfSmartCopy)