Dominic Maricic wrote:
Could someone please explain the concept of creating the pdf in 2
passes, the second time to create the page numbers. I can’t do page
numbers using page events as it screws up when my table of contents is
greater than one page. It seems the best method would be 2 passes. I
would appreciate hearing how some of you have implemented this, or
suggestions on doing it.
There's an example on how to add Watermarks/pagenumbers/extra page to
an existing file (on your filesystem), here:
http://itextdocs.lowagie.com/tutorial/general/copystamp/index.html#pdfstamper
You'll have to adapt it to accept a file that is built in memory.
Are you making your ToC using page reordering?
Maybe you could generate your actual document in one ByteArrayOutputStream,
your ToC in another one, then use PdfCopy to concat both and PdfStamper to
number the pages. (It's just a suggestion, there's more than one way to
do it.)
br,
Bruno
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions