|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.pdf.cos.COSBasedObject
de.intarsys.pdf.pd.PDObject
de.intarsys.pdf.pd.PDPageNode
de.intarsys.pdf.pd.PDPageTree
public class PDPageTree
A page tree node is a container for pages (and other page tree nodes) within
a PFD document. All pages in the document are direct or indirect children of
the root page tree node in the COSCatalog
object
Nested Class Summary | |
---|---|
static class |
PDPageTree.MetaClass
The meta class implementation |
Field Summary | |
---|---|
static COSName |
DK_Count
|
static COSName |
DK_Kids
|
static PDPageTree.MetaClass |
META
The meta class instance |
Fields inherited from class de.intarsys.pdf.pd.PDPageNode |
---|
CN_Type_Page, DK_Pages, DK_Parent, DK_Rotate |
Fields inherited from class de.intarsys.pdf.pd.PDObject |
---|
DK_Subtype, DK_Type |
Method Summary | |
---|---|
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 page nodes 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). |
void |
invalidateCaches()
Invalidate all local caches as the base object may have changed. |
boolean |
isPage()
Answer true if this is a single page node. |
PDPageTree |
rebalance()
Rebalanve this. |
void |
removeNode(PDPageNode node)
Remove a node |
Methods inherited from class de.intarsys.pdf.pd.PDPageNode |
---|
dispose, getCropBox, getFirstAnnotation, getGenericParent, getLastAnnotation, getLastPage, getMediaBox, getNextNode, getNodeIndex, getPageAt, getParent, getPreviousNode, getRotate, setCropBox, setGenericParent, setMediaBox, setRotate |
Methods inherited from class de.intarsys.pdf.pd.PDObject |
---|
cosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, toString |
Methods inherited from class de.intarsys.pdf.cos.COSBasedObject |
---|
changed, 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, setFieldString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PDPageTree.MetaClass META
public static final COSName DK_Kids
public static final COSName DK_Count
Method Detail |
---|
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()
PDPageNode
getCount
in class PDPageNode
public PDPageNode getFirstNode()
PDPageNode
This may return null if the receiver is an empty collection.
getFirstNode
in class PDPageNode
public PDPage getFirstPage()
PDPageNode
getFirstPage
in class PDPageNode
public List getGenericChildren()
PDObject
PDObject
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 PDObject
PDObject
children if the receiver is a
node in a hierarchical structure .public List getKids()
public PDPageNode getLastNode()
PDPageNode
This may return null if the receiver is an empty collection.
getLastNode
in class PDPageNode
public void invalidateCaches()
COSBasedObject
invalidateCaches
in class PDPageNode
public boolean isPage()
PDPageNode
true
if this is a single page node.
isPage
in class PDPageNode
true
if this is a single page node.public PDPageTree rebalance()
PDPageTree
created or null if nothing changed.public void removeNode(PDPageNode node)
node
- The child node to remove
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |