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

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

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