Chris Dole wrote:

Let's say also that I have a list of words that I want in my index. Is there a 
way to scan the PDF page and detect which words are on which page? I could then 
append the index page at the end of the toc/body document already formed.
If the PDF is generated by iText and your text isn't hyphenated,
it is possible to scan the content stream of a page.
See the thread of this mailing list post:
http://article.gmane.org/gmane.comp.java.lib.itext.general/20964/
(Chapter 18 in the book ;-) )

But you can also create the index while you are creating
the document if you 'tag' the Chunks containing the
keywords in your list. There will be an example in chapter 4
of the book that uses the IndexEvents class to do this.
http://itextdocs.lowagie.com/docs/com/lowagie/text/pdf/events/IndexEvents.html
(I thought there was such an example in the tutorial,
but I can't seem to find it.)
br,
Bruno


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to