Hi,
the example 5.12 in the book show me, how I create a TOC.
The TOC is created on the end of the pdf document and reorderd with
writer.reorderPages(order). The TOC is now on the first page.
If I use page numbers in the TOC with e.g.
titles.add(new Paragraph(title.getContent() + " (" +
writer.getPageNumber() + ")"));
I get after reordering the wrong page numbers.
My first idea was, to save the ArrayList with the Paragraphs with a
ObjectOutputStream and load the data in a second run, but some classes
have not implements the Interface Serializable.
Now I use a quick and dirty solution with store only the content of the
Paragraph as a String.
Is there a better solution to get the right page numbers?
By
Michael
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php