Menu

Table of Contents

2006-02-11
2013-05-01
  • Kazuya Ujihara

    Kazuya Ujihara - 2006-02-11

    > 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>

     
    • Kazuya Ujihara

      Kazuya Ujihara - 2006-02-11

      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.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.