Andrea Vacondio created PDFBOX-2695:
---------------------------------------
Summary: Iterate PDOutlineNode children
Key: PDFBOX-2695
URL: https://issues.apache.org/jira/browse/PDFBOX-2695
Project: PDFBox
Issue Type: Improvement
Components: PDModel
Affects Versions: 2.0.0
Reporter: Andrea Vacondio
Priority: Minor
Fix For: 2.0.0
Give an outline item, I need to walk through all its children. ??The items at
each level of the hierarchy form a linked list, chained together through their
Prev and Next entries and accessed through the First and Last entries in the
parent item?? so I created a simple patch to allow this kind of code:
{code}
if(node !=null){
for (PDOutlineItem current : node.children()) {
//do something with the
}
}
{code}
Given an item, PDOutlineNode.children returns an iterator that walks through
the children until there is no NEXT or NEXT is equals to the starting element.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]