--- Comment #25 from Martin K <martin.koeg...@brz.gv.at> 2011-06-16 23:11:44
"Add support for clearing objects at write time":
The structure tree is one big document wide tree. The root is written after the
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 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.