> I have been using your itext pdf generator class, I was wondering if there is anyway of creating a Table of Contents for a PDF document I am generating????
> I realize there is a Table of Contents for rtf documents but nothing for pdf???
> I need to create the table of contents and insert it at the top of the pdf after the content has been placed in the document to get page numbers correct.
> Any suggestions would be great.
You can do it by using paragraph event with template or concatenate. See the following samples.
> I have been using your itext pdf generator class, I was wondering if there is anyway of creating a Table of Contents for a PDF document I am generating????
> I realize there is a Table of Contents for rtf documents but nothing for pdf???
> I need to create the table of contents and insert it at the top of the pdf after the content has been placed in the document to get page numbers correct.
> Any suggestions would be great.
You can do it by using paragraph event with template or concatenate. See the following samples.
<http://www.ujihara.jp/iTextdotNET/examples/com/lowagie/examples/directcontent/pageevents/Bookmarks.java>
<http://www.ujihara.jp/iTextdotNET/examples/com/lowagie/examples/directcontent/Templates.java>
<http://www.ujihara.jp/iTextdotNET/examples/concat_pdf.java>
It's not so simple because there is no way to know the number of pages of TOC part before it outputs all of pages.