https://issues.apache.org/bugzilla/show_bug.cgi?id=50852
--- Comment #25 from Martin K <[email protected]> 2011-06-16 23:11:44 UTC --- "Add support for clearing objects at write time": The structure tree is one big document wide tree. The root is written after the last page. The structure tree has circular links (parent=>child, child=>parent) and external links to tree nodes (eg. from the per page element list). If we don't want to keep the whole thing into memory, we need to write parts of the tree and then purge all references to them. Without this patch, a write of structure elements would be: * add the object to the PDF document * callback to the caller do the actual write or get the OutputStream somehow to do the write (The whole logic is in PDFLogicalStructureHandler, which currently only has access to the PDF document, not the output stream). * Traverse the written structure elements again and break the loops With this patch, a write of structure elements is only adding the objects to the document. The next write operation will store the streams and call clean the objects afterwards. For a structure element, the clean operation is mostly removing it's links to child elements, which also results in breaking the loops. The same logic could eg. be used for writing pages: The clean function of a pages would be deleting the page content. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
