Quoting [EMAIL PROTECTED]: > Hai, > > we were using ITEXT for our project to create PDF documents and this working > fine.I have a requirement like this, I need to create the index page at the > begining of the document. > > index page will look like this > > Slno Topic Page Number > 1 Chapter1 1-3 > 2 Chapter2 4-6 > .... > ... > > Since this is the dynamic page for each chapter How can I get page numbers > for each chapter and finally put the page in Index page.
For the Page Numbers for each Chapter: Do something similar as in example 9 in Chapter 2 of the tutorial http://www.lowagie.com/iText/tutorial/ch02.html#generictag But use the onSection or onChapter event to compose your TOC: http://www.lowagie.com/iText/tutorial/ch12.html#paragraphchaptersection Of course this can only be used to add a TOC at the end of the Document. If you know in advance how many pages you will need for your TOC, you could add a PdfTemplate to your Document BEFORE generating the rest of the Document and fill the PdfTemplate afterwards. I know people have asked to provide a means to change the order of Pages after generation of the Document (add pages at a different branch in the Page Tree), but you should check with Paulo to see if that is already implemented... Bruno ------------------------------------------------------- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
