Chris Hannemann wrote:
> If anyone has an example of this or any suggestions I would appreciate 
> the help.

Et voilĂ :
http://www.1t3xt.info/examples/browse/?page=example&id=382

> I have a directory tree with about a dozen sub directories.

I created 3 files in a directory:
helloworld.pdf hellosun.pdf hellomoon.pdf
It should be easy to adapt the example so that you can
spider directories (that's just Java, no iText involved).

> I want to:
> 
> 1. Create a chapter in the PDF for each sub directory. 

I created a flat outline tree with three entries.
In your case, you should have something like:
PdfOutline chapter = new PdfOutline(root, action, title);
for the directories and then
PdfOutline section = new PdfOutline(chapter, otheraction, othertitle);
for the a subdirectory.

> 2. Add a page before each chapter with the chapter title (name of 
> directory).

I created a 1-page PDF in memory using PdfWriter to do this.

> 3. I would like to create a table of contents pointing to each chapter 
> title page.

See the bookmark panel at the left of the resulting PDF.

> 4. I also want to add page numbers to the pages.

Oops, I forgot about that.
Give me some more time and I'll update the example.
-- 
This answer is provided by 1T3XT BVBA

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to