public class PDPageTree extends PDPageNode
COSCatalog object| Modifier and Type | Class and Description |
|---|---|
static class |
PDPageTree.MetaClass
The meta class implementation
|
| Modifier and Type | Field and Description |
|---|---|
static COSName |
DK_Count |
static COSName |
DK_Kids |
static PDPageTree.MetaClass |
META
The meta class instance
|
CN_Type_Page, CN_Type_Pages, DK_Parent, DK_RotateDK_Subtype, DK_Type| Modifier and Type | Method and Description |
|---|---|
void |
addNode(int index,
PDPageNode newNode)
Add a page after at the designated index.
|
void |
addNode(PDPageNode newNode)
Add a page as immediate child at last position
|
void |
addNodeAfter(PDPageNode newNode,
PDPageNode destination)
Add a page after the designated destination page. the destination page
must be in the receiver tree node
|
int |
getCount()
The total number of pages represented by this node.
|
PDPageNode |
getFirstNode()
Get the first node within the receiver or the receiver if it is not a
collection (page tree).
|
PDPage |
getFirstPage()
Get the first page (leaf node) within the receiver hierarchy.
|
List |
getGenericChildren()
Get a collection of
PDObject children if the receiver is a node
in a hierarchical structure (like page nodes or form fields). |
List |
getKids()
Get the list of all
PDPageNode instances that are children of the
receiver. |
PDPageNode |
getLastNode()
Get the last node within the receiver or the receiver if it is not a
collection (page tree).
|
PDPage |
getLastPage()
Get the last page (leaf node) within the receiver hierarchy.
|
void |
invalidateCaches()
Invalidate all local caches as the base object may have changed.
|
boolean |
isPage()
Answer
true if this is a single page node. |
boolean |
isValid()
true if this page node object is a valid participant in
the documents page tree. |
PDPageTree |
rebalance()
Rebalance this.
|
void |
removeNode(PDPageNode node)
Remove a node
|
dispose, getCropBox, getFirstAnnotation, getGenericParent, getLastAnnotation, getMediaBox, getNextNode, getNodeIndex, getPageAt, getParent, getPreviousNode, getRotate, setCropBox, setGenericParent, setMediaBox, setRotatecosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, toStringchanged, cosGetArray, cosGetDict, cosGetDoc, cosGetField, cosGetObject, cosGetStream, cosHasField, cosRemoveField, cosSetField, getAttribute, getFieldBoolean, getFieldDate, getFieldFixed, getFieldFixedArray, getFieldInt, getFieldMLString, getFieldString, removeAttribute, setAttribute, setFieldBoolean, setFieldFixed, setFieldInt, setFieldMLString, setFieldName, setFieldObject, setFieldStringpublic static final PDPageTree.MetaClass META
public static final COSName DK_Kids
public static final COSName DK_Count
public void addNode(int index,
PDPageNode newNode)
index - the index which to insert the new child atnewNode - the child page to addpublic void addNode(PDPageNode newNode)
newNode - the child page to createpublic void addNodeAfter(PDPageNode newNode, PDPageNode destination)
newNode - the child page to adddestination - the page after which to insert the new childpublic int getCount()
PDPageNodegetCount in class PDPageNodepublic PDPageNode getFirstNode()
PDPageNodeThis may return null if the receiver is an empty collection.
getFirstNode in class PDPageNodepublic PDPage getFirstPage()
PDPageNodegetFirstPage in class PDPageNodepublic List getGenericChildren()
PDObjectPDObject children if the receiver is a node
in a hierarchical structure (like page nodes or form fields).
This enables the generic implementation of inherited field values and so on.
A concrete PDObject implementation supporting inheritance should implement this method.
getGenericChildren in class PDObjectPDObject children if the receiver is a
node in a hierarchical structure .public List getKids()
PDPageNode instances that are children of the
receiver.public PDPageNode getLastNode()
PDPageNodeThis may return null if the receiver is an empty collection.
getLastNode in class PDPageNodepublic PDPage getLastPage()
PDPageNodegetLastPage in class PDPageNodepublic void invalidateCaches()
COSBasedObjectinvalidateCaches in class PDPageNodepublic boolean isPage()
PDPageNodetrue if this is a single page node.isPage in class PDPageNodetrue if this is a single page node.public boolean isValid()
PDPageNodetrue if this page node object is a valid participant in
the documents page tree.isValid in class PDPageNodetrue if this page node object is a valid
participant in the documents page tree.public PDPageTree rebalance()
PDPageTree created or null if nothing changed.public void removeNode(PDPageNode node)
node - The child node to removeCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.