1 Reply Latest reply on Feb 27, 2007 8:18 AM by kim il sung

    Help with PDF creation using CFDOCUMENT / iText

      Hi everyone,

      Finally made the jump to CF7 after sticking with 5 for way too long and now have an urgent need to generate PDF.

      <cfdocument> seems to do better than anything else at converting HTML styled with CSS, but falls short in a few fundamental areas. What I need to do ( to name 3) is:

      * Generate a table of contents - including page numbers
      * Have far greater control over the headers / footers
      * Swap page orientation mid-document

      I can get round the page orientation thing by creating each section as an individual PDF and gluing them back together using PaulH's excellent PDF concatenation code. Using <cfdocument> I can reserve space for the headers / footers, and add a table of contents with placeholders for the numbers.

      Now, my question: Will I be able to rewrite all the page numbers, finish off the table of contents and headers / footers using iText? i.e. traverse the concatenated PDF file, rewrite the headers / footers, work out the page numbers and rewrite the TOC?

      I'm not asking for sample code or even a how to - just a heads-up from some who knows iText well and can quickly say whether this is feasible.

      I hope it is because my alternative approach is to go down the xsl-fo route which I suspect will be more effort in the long run.