Re: [iText-questions] TOC with iText

2011-03-09 Thread M. Niedermair
Hi, > Worst case should be two passes. No! first pass: - TOC is empty - table of figure is empty - index is empty second pass: - TOC 3 pages (the table of figure is not yet counted) - TOF 2 pages - 5 pages delta third pass: - now TOC is correct - now TOF is correct - now index is correct > Pass

Re: [iText-questions] TOC with iText

2011-03-08 Thread Mark Storer
sclaimer; Disclaimer DisCard = null; > -Original Message- > From: M. Niedermair [mailto:[email protected]] > Sent: Tuesday, March 08, 2011 9:06 AM > To: Post all your questions about iText here > Subject: Re: [iText-questions] TOC with iText > > Hi, > > >

Re: [iText-questions] TOC with iText

2011-03-08 Thread M. Niedermair
Hi, > First pass: > * Reserve space for the table of contents on a blank page the problem is, that I dont know at the beginnig, how many pages I need for the TOC. > * Create an ArrayList of objects containing text and page numbers > * Add objects to the ArrayList as I encounter "interesting" co

Re: [iText-questions] TOC with iText

2011-03-08 Thread Greg Holling
I don't know about the other lurkers, but I do the following: First pass: * Reserve space for the table of contents on a blank page * Create an ArrayList of objects containing text and page numbers * Add objects to the ArrayList as I encounter "interesting" content that should be added to the TOC

[iText-questions] TOC with iText

2011-03-08 Thread M. Niedermair
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.g