I'm trying to create a routine that will take an existing single-page pdf called separator.pdf (just a blank page actually), and interleave that between the pages of another doc.pdf.
For example, if document.pdf has 3 pages, the output should be: doc page 1 separator page 1 doc page 2 separator page 1 doc page 3 separator page 1 In case anyone is curious, this is to handle printing on duplex printers, where you don't want the pdf to be printed duplex. I've modelled my code on the code in com.lowagie.tools.concat_pdf, and though I can append a separator after a whole document, if I try to interleave the separator page in between the document pages, I end up with a corrupt pdf file produced. I tried using the same document and writer (PDFCopy) objects for both the doc.pdf and separator.pdf files, but that doesn't work. I then tried to create different document and writer objects for both the doc.pdf and separator.pdf files, with the ones for the separator only used to read the separator page, but again, it fails with a corrupt pdf being produced. This would seem to be because internally the reader, document, writer and page are all interdependent, and introducing a different reader/page with a writer.addPage() call screws something up internally. It seems that there is no obvious way to do this with iText. Can anyone point me in the right direction as to how to do this kind of interleaving? Thanks! Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
