Joe McVerry wrote:
> I copied the section logic out of the itext api html docs and all pdf shows is
> the chapters, no sections.

I don't know where you found your example,
but it's wrong. The official documentation
(the tutorial, the iText book, my explanations
sent to the mailing list) is clear:

When a basic building block (like Paragraph,
Chapter, Chunk,...) is added to the document,
it is IMMEDIATELY written to the PDF.
Every time a page is finished, IT IS FLUSHED
to the OutputStream (that's what makes iText
fast and memory friendly).

Knowing that, it's easy to realize that using
Chapter isn't a memory friendly object: you
have to add all the content to the Chapter
BEFORE adding the Chapter to the document.
If you do it the other way right, everything
you add to the Chapter object afterwards is
ignored.

br,
Bruno

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to