Hello,

I am new to iText.  So far I am very happy to have found something that looks 
like it will help me out a lot on my latest project.  I have a question about 
generating a table of contents using the PdfWriter.  I looked through a number 
of the postings here, but without a search feature (or at least I could not 
find a search feature), I cannot be sure that someone else has not posted a 
similar question.

I am trying to generate a big "report".  This report summarizes information 
collected from a survey, with each question in the survey summarized on a 
separate page in the report (the summary for a given question may span 2 
pages, but usually just 1).  There could be up to several thousand questions, 
so the report is going to be quite big.  This leads me to want to provide a 
way for readers of the report to find the sections they are interested in.

For viewing the report online, it seems that using bookmarks and the PDF 
Outline is exactly what I want.  But, if someone prints the report, that won't 
help.  So I want to include a true table of contents, like you might find in a 
Word document.

I don't have any concerns with logically generating a table of contents.  My 
concern is that the table of contents needs to be placed in the document in 
front of all the pages of the report, and I am pretty sure that all writing to 
the file is done sequentially.  So as I add a new question summary to the 
report, I cannot update the table of contents to have a new entry, because I 
am already past where the table of contents lives in the document.

Sorry for the long explanation, but I wanted to be clear about what I'm trying 
to do.  So far the only thing I have been able to think of is to create two 
separate PDF documents, one for the table of contents and one for the actual 
report, and then merge them.  However, I am not sure if I could then make the 
necessary updates to the resulting document, for example to have the table of 
contents entries be linked to the pages they refer to.

Any advice, or pointers to examples, would be appreciated.

Thanks,
Jason



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to