You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/03/02 22:26:04 UTC

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

    [ https://issues.apache.org/jira/browse/PDFBOX-2695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14343787#comment-14343787 ] 

ASF subversion and git services commented on PDFBOX-2695:
---------------------------------------------------------

Commit 1663436 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1663436 ]

PDFBOX-2695: Iterate PDOutlineNode children, by Andrea Vacondio

> 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