Provided that you know that your TOC fits onto a single page you can do it with events. I did it by opening a columntext on a page, and on certain events adding text to it. onCloseDocument you say go() on the column, and that works. It can even make links to the chapters. If it doesn't fit onto a fixed number of pages this one doesn't work, though - at least I don't know how to.

Adriaan

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Monday, May 17, 2004 7:36 PM
To: [EMAIL PROTECTED]
Subject: [iText-questions] TOC question, redux...


I know I've sort of asked this before, but I only received an answer on how to create an outline. How do I create a Table of Contents for the beginning of a long, complex iText PDF? Specifically, how would I place the TOC at the beginning of a document when I don't know what the whole document tree is until I'm done parsing and writing the content? Is there a way to do this in one pass? (I'm really hoping so) MSWord allows you to programmatically insert a TOC object at the beginning of a document from a template and recalculate the whole document when you are done writing it. is there an itext equivalent?

I'm sorry if the answer is buried in the mailing list archives, I've tried to do my due diligince, but the archives seem to be working eratically today...

Thanx in advance,
Jake





------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to