| Modifier and Type | Class and Description |
|---|---|
| private class | PDPageTree.
Iterator which walks all pages in the tree, in order. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final PDDocument | |
| private static final Log | |
| private final Set | |
| private final COSDictionary |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| pack-priv | PDPageTree(COSDictionary
A page tree root. root, PDDocument The document which contains "root". document)Constructor for reading. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private boolean | |
| public PDPage | Returns: the page at the given indexzero-based index index)Returns the page at the given index. |
| private COSDictionary | Returns: COS dictionary of the Page object1-based page number pageNum, COSDictionary page tree node to search node, int number of pages encountered so far encountered)Returns the given COS page using a depth-first search. |
| public COSDictionary | getCOSObject()
Implements org. Convert this standard java object to a COS object. |
| public int | Returns: the number of leaf nodes, 0 if not presentReturns the number of leaf nodes (page objects) that are descendants of this root within the page tree. |
| public static COSBase | Returns: COS value for the given keypage object node, COSName the key to look up key)Returns the given attribute, inheriting from parent tree nodes if necessary. |
| private List | Returns: list of kidspage tree node node)Helper to get kids from malformed PDFs. |
| private void | |
| public int | |
| public void | insertAfter(PDPage
the page to be inserted. newPage, PDPage the page that is to be before the new page. prevPage)Insert a page after another page within a page tree. |
| public void | insertBefore(PDPage
the page to be inserted. newPage, PDPage the page that is to be after the new page. nextPage)Insert a page before another page within a page tree. |
| private boolean | isPageTreeNode(COSDictionary node)
Returns true if the node is a page tree node (i.e. and intermediate). |
| public Iterator | iterator()
Implements java. Returns an iterator which walks all pages in the tree, in order. |
| public void | |
| public void | |
| private void | |
| private static void |
| document | back to summary |
|---|---|
| private final PDDocument document | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| pageSet | back to summary |
|---|---|
| private final Set<COSDictionary> pageSet | |
| root | back to summary |
|---|---|
| private final COSDictionary root | |
| PDPageTree | back to summary |
|---|---|
| public PDPageTree() Constructor for embedding. | |
| PDPageTree | back to summary |
|---|---|
| public PDPageTree(COSDictionary root) Constructor for reading.
| |
| PDPageTree | back to summary |
|---|---|
| pack-priv PDPageTree(COSDictionary root, PDDocument document) Constructor for reading.
| |
| add | back to summary |
|---|---|
| public void add(PDPage page) Adds the given page to this page tree.
| |
| findPage | back to summary |
|---|---|
| private boolean findPage(PDPageTree. | |
| get | back to summary |
|---|---|
| public PDPage get(int index) Returns the page at the given index.
| |
| get | back to summary |
|---|---|
| private COSDictionary get(int pageNum, COSDictionary node, int encountered) Returns the given COS page using a depth-first search.
| |
| getCOSObject | back to summary |
|---|---|
| public COSDictionary getCOSObject() Implements org. Doc from org. Convert this standard java object to a COS object.
| |
| getCount | back to summary |
|---|---|
| public int getCount() Returns the number of leaf nodes (page objects) that are descendants of this root within the page tree.
| |
| getInheritableAttribute | back to summary |
|---|---|
| public static COSBase getInheritableAttribute(COSDictionary node, COSName key) Returns the given attribute, inheriting from parent tree nodes if necessary.
| |
| getKids | back to summary |
|---|---|
| private List Helper to get kids from malformed PDFs.
| |
| increaseParents | back to summary |
|---|---|
| private void increaseParents(COSDictionary parentDict) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(PDPage page) Returns the index of the given page, or -1 if it does not exist.
| |
| insertAfter | back to summary |
|---|---|
| public void insertAfter(PDPage newPage, PDPage prevPage) Insert a page after another page within a page tree.
| |
| insertBefore | back to summary |
|---|---|
| public void insertBefore(PDPage newPage, PDPage nextPage) Insert a page before another page within a page tree.
| |
| isPageTreeNode | back to summary |
|---|---|
| private boolean isPageTreeNode(COSDictionary node) Returns true if the node is a page tree node (i.e. and intermediate). | |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Returns an iterator which walks all pages in the tree, in order.
| |
| remove | back to summary |
|---|---|
| public void remove(int index) Removes the page with the given index from the page tree.
| |
| remove | back to summary |
|---|---|
| public void remove(PDPage page) Removes the given page from the page tree.
| |
| remove | back to summary |
|---|---|
| private void remove(COSDictionary node) Removes the given COS page. | |
| sanitizeType | back to summary |
|---|---|
| private static void sanitizeType(COSDictionary dictionary) | |
| Modifier and Type | Field and Description |
|---|---|
| private final Queue | |
| private Set |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | |
| public PDPage | |
| public void | remove()
Overrides default java. Removes from the underlying collection the last element returned by this iterator (optional operation). |
| queue | back to summary |
|---|---|
| private final Queue<COSDictionary> queue | |
| set | back to summary |
|---|---|
| private Set<COSDictionary> set | |
| PageIterator | back to summary |
|---|---|
| private PageIterator(COSDictionary node) | |
| enqueueKids | back to summary |
|---|---|
| private void enqueueKids(COSDictionary node) | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public PDPage next() Implements java. Doc from java. Returns the next element in the iteration. | |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private int | |
| private final COSDictionary |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void |
| found | back to summary |
|---|---|
| private boolean found | |
| index | back to summary |
|---|---|
| private int index | |
| searched | back to summary |
|---|---|
| private final COSDictionary searched | |
| SearchContext | back to summary |
|---|---|
| private SearchContext(PDPage page) | |
| visitPage | back to summary |
|---|---|
| private void visitPage(COSDictionary current) | |