PdfpTable's setComplete when using Chapters and Sections
I've created a document using the chapter and section API, so 'bookmarks' are automatic and everything flows as I add content to a section and sections to the chapter(s).
Then I ran into a memory issue with Tables. The solution was in the book using the PdfpTable's setComplete(false) method. HOWEVER, the book notes and testing proves this only works when you add the table to the Document as you progress and it does NOT work with sections or chapters.
SO, either I have to give up on chapters and sections and use a lower level method of getting the same 'look'
OR,
possibly find a technique to make mini-pdfs and then 'glue' them into the desired final pdf.
I am not sure of the best path to follow to make use of the setComplete method that only work with a document and not chapter/section.
A nudge in the right direction would be helpful. THANKS!
- Login to post comments

I would use PdfOutline
Submitted by Bruno Lowagie on Fri, 06/08/2012 - 06:29.Maybe I shouldn't have mentioned Chapter/Section in the second edition. It's really not that difficult to use PdfOutline to create bookmarks. Moreover, you have much more freedom to create bookmarks with customized functionality.
The technique to make mini-PDFs would work too, but from an efficiency point of view, using PdfOutline is better. The end result will look identically from the outside, but on the inside there will be small differences. The file size will be bigger if you use the technique of glueing files together.