Index Generation
- From: Bruno Lowagie <bruno (at) lowagie.com>
- Date: Fri, 25 Aug 2006 11:11:59 +0200
Gautier Charles (Consultant) wrote:
> Hi Bruno,
>
> I'm looking for a best practise to generate a table of content,
> considering the faxt that my document is made of one single large
> PdfPTable.
>
OK, you were asking on comp.text.pdf about this.
Well, there are different ways to do this.
Chapter 4 of the upcoming book has a very simple example
that explains how you can 'tag' certain words and use these
tags to create an index on the last page:
http://itext.ugent.be/itext-in-action/examples/chapter04/results/fox_dog_generic3.pdf
http://itext.ugent.be/itext-in-action/examples/chapter04/FoxDogGeneric3.java
If you are looking to create an outline tree, this is
discussed in chapter 13, but the examples for
this chapter are not yet online, but there are some
useful examples in the online tutorial here:
http://itextdocs.lowagie.com/tutorial/objects/bookmarks/#bookmarks
Personally I would work with generic tags in a page event:
http://itextdocs.lowagie.com/tutorial/directcontent/pageevents/
You can pass all the information needed to build any ToC
in the string passed with onGenericTag (you get the exact
coordinates automatically in the rectangle object).
Please use the mailinglist address if you have further questions.
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
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions