Franck Bollaro wrote: > Hi, > > I use the iText api in my Spring application to generate document with a > various > number a page. > I would like to build a Table of content. > I have seen on the tutorial that it is possible with RTF document by using > RtfTableOfContents() but how can I do with pure PDF document ? > There is the solution of building 2 documents and concatenate them after but > is > there a better solution ?
I'm not sure if I understand the question. Let me give you a few book samples you can try; then tell me if any of them solves your problem. In this example, an outline is created because we are using Chapter and Section (see the Bookmarks panel to the left in Adobe Reader). http://itext.ugent.be/itext-in-action/examples/chapter14/ChapterEvents.java Using events, a PDF is created with the same outline on a PDF page. Afterwards, toc and document are concatenated. In this example, an index is built using IndexEvents. The index is added at the end of the document, but because we want the index to be on the first page, we reorder the pages: http://itext.ugent.be/itext-in-action/examples/chapter14/ReorderPages.java If I misunderstood your questions, and if you want to create an outline for the bookmarks panel (not a TOC on paper), then I will have to give you some examples from Chapter 13: http://itext.ugent.be/itext-in-action/chapter.php?chapter=13 br, Bruno ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
