[
https://issues.apache.org/jira/browse/PDFBOX-2695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrea Vacondio updated PDFBOX-2695:
------------------------------------
Description:
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 Iterable that walks through
the children until there is no NEXT or NEXT is equals to the starting element.
was:
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.
> 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
> Labels: outline
> Fix For: 2.0.0
>
> Attachments: iterable_children.diff
>
>
> 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 Iterable 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]