I am writing something that will build a table of contents based upon onChapter() page 
events. When a new chapter is added, I would like to grab the title to use in the 
table of contents. Something like the Glossary example, but useing the onChapter() 
method, not the onGenericTag() method.

The method signature for onChapter() from the PdfPageEventHelper class is 
onChapter(PdfWriter writer, Document document, float paragraphPosition, Paragraph 
title). I was thinking that I could use the title. I tried to get an ArrayList of 
Chunks (I am only expecting one I believe), but can't figure out how to get the text 
String out of this. The chapters were created by using : Chapter chapter = new 
Chapter( "This is a chapter title",1 ); I was expecting the text "This is a chapter 
title" to be in the Paragraph title of the onChapter() method signiature. Am I wrong? 
How would I get the text back in my page event class?

Chris Ward - Developer
Integral Business Solutions
Email:[EMAIL PROTECTED]
Web:  www.go-integral.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
No, I will not fix your computer.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to