You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2015/03/02 22:25:05 UTC

[jira] [Resolved] (PDFBOX-2695) Iterate PDOutlineNode children

     [ https://issues.apache.org/jira/browse/PDFBOX-2695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-2695.
-------------------------------------
    Resolution: Fixed
      Assignee: Tilman Hausherr

Good idea - thanks!

> 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
>            Assignee: Tilman Hausherr
>            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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org