intarsys PDF library API

de.intarsys.pdf.pd
Class PDPageNode

java.lang.Object
  extended by de.intarsys.pdf.cos.COSBasedObject
      extended by de.intarsys.pdf.pd.PDObject
          extended by de.intarsys.pdf.pd.PDPageNode
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Direct Known Subclasses:
PDPage, PDPageTree

public abstract class PDPageNode
extends PDObject

An abstract superclass for pages and page tree nodes


Nested Class Summary
static class PDPageNode.MetaClass
          The meta class implementation
 
Field Summary
static COSName CN_Type_Page
           
static COSName DK_Pages
           
static COSName DK_Parent
           
static COSName DK_Rotate
           
static PDPageNode.MetaClass META
          The meta class instance
 
Fields inherited from class de.intarsys.pdf.pd.PDObject
DK_Subtype, DK_Type
 
Method Summary
 void dispose()
          Deprecated.  
abstract  int getCount()
          The total number of pages represented by this node.
 CDSRectangle getCropBox()
          The rectangle in user space coordinates defining the visible region of the page.
 PDAnnotation getFirstAnnotation()
          The first PDAnnotation linked on this page.
abstract  PDPageNode getFirstNode()
          Get the first node within the receiver or the receiver if it is not a collection (page tree).
abstract  PDPage getFirstPage()
          Get the first page (leaf node) within the receiver hierarchy.
 PDObject getGenericParent()
          The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).
 PDAnnotation getLastAnnotation()
          The last PDAnnotation linked on this page.
abstract  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.
 CDSRectangle getMediaBox()
          The rectangle in user space coordinates defining the physical page boundaries. user space is measured in 1/72 inch initially
 PDPageNode getNextNode()
          Get the next node after the receiver.
 int getNodeIndex()
          The zero based index of this within the document.
 PDPage getPageAt(int index)
          The page at index within the receivers subtree.
 PDPageTree getParent()
          The parent node if available.
 PDPageNode getPreviousNode()
          The previous node .
 int getRotate()
          The number of degrees by which the page should be rotated clockwise when displayed or printed.
 void invalidateCaches()
          Invalidate all local caches as the base object may have changed.
abstract  boolean isPage()
          Answer true if this is a single page node.
 void setCropBox(CDSRectangle rect)
          Set the rectangle in user space coordinates defining the visible region of the page. user space is measured in 1/72 inch initially
 void setGenericParent(PDObject newParent)
          Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).
 void setMediaBox(CDSRectangle rect)
          Set the rectangle in user space coordinates defining the physical page boundaries. user space is measured in 1/72 inch initially
 void setRotate(int rotate)
          The number of degrees by which the page should be rotated clockwise when displayed or printed.
 
Methods inherited from class de.intarsys.pdf.pd.PDObject
cosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, getGenericChildren, 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

META

public static final PDPageNode.MetaClass META
The meta class instance


DK_Parent

public static final COSName DK_Parent

DK_Pages

public static final COSName DK_Pages

CN_Type_Page

public static final COSName CN_Type_Page

DK_Rotate

public static final COSName DK_Rotate
Method Detail

dispose

public void dispose()
Deprecated. 


getCount

public abstract int getCount()
The total number of pages represented by this node.

Returns:
The total number of pages represented by this node.

getCropBox

public CDSRectangle getCropBox()
The rectangle in user space coordinates defining the visible region of the page. User space is measured in 1/72 inch initially

Returns:
The rectangle in user space coordinates defining the visible region of the page

getFirstAnnotation

public PDAnnotation getFirstAnnotation()
The first PDAnnotation linked on this page.

Returns:
The first PDAnnotation linked on this page.

getFirstNode

public abstract PDPageNode getFirstNode()
Get the first node within the receiver or the receiver if it is not a collection (page tree).

This may return null if the receiver is an empty collection.

Returns:
Get the first node within the receiver or the receiver if it is not a collection (page tree).

getFirstPage

public abstract PDPage getFirstPage()
Get the first page (leaf node) within the receiver hierarchy.

Returns:
Get the first page (leaf node) within the receiver hierarchy.

getGenericParent

public PDObject getGenericParent()
Description copied from class: PDObject
The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

A concrete PDObject implementation supporting inheritance should implement this method.

Overrides:
getGenericParent in class PDObject
Returns:
The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

getLastAnnotation

public PDAnnotation getLastAnnotation()
The last PDAnnotation linked on this page.

Returns:
The last PDAnnotation linked on this page.

getLastNode

public abstract PDPageNode getLastNode()
Get the last node within the receiver or the receiver if it is not a collection (page tree).

This may return null if the receiver is an empty collection.

Returns:
Get the last node within the receiver or the receiver if it is not a collection (page tree).

getLastPage

public PDPage getLastPage()
Get the last page (leaf node) within the receiver hierarchy.

Returns:
Get the last page (leaf node) within the receiver hierarchy.

getMediaBox

public CDSRectangle getMediaBox()
The rectangle in user space coordinates defining the physical page boundaries. user space is measured in 1/72 inch initially

Returns:
The rectangle in user space coordinates defining the physical page boundaries

getNextNode

public PDPageNode getNextNode()
Get the next node after the receiver.

Returns:
Get the next node after the receiver.

getNodeIndex

public int getNodeIndex()
The zero based index of this within the document.

Returns:
The zero based index of this within the document.

getPageAt

public PDPage getPageAt(int index)
The page at index within the receivers subtree.

Parameters:
index - The page index
Returns:
The page at index within the receivers subtree.

getParent

public PDPageTree getParent()
The parent node if available. The root tree node of the document has no parent.

Returns:
The parent node if available.

getPreviousNode

public PDPageNode getPreviousNode()
The previous node .

Returns:
The previous node.

getRotate

public int getRotate()
The number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a multiple of 90. Default value: 0.

Notice: the value is inheritable

Returns:
Rotation as a multiple of 90

invalidateCaches

public void invalidateCaches()
Description copied from class: COSBasedObject
Invalidate all local caches as the base object may have changed.

Overrides:
invalidateCaches in class COSBasedObject

isPage

public abstract boolean isPage()
Answer true if this is a single page node.

Returns:
Answer true if this is a single page node.

setCropBox

public void setCropBox(CDSRectangle rect)
Set the rectangle in user space coordinates defining the visible region of the page. user space is measured in 1/72 inch initially

Parameters:
rect - The rectangle defining the visible page region

setGenericParent

public void setGenericParent(PDObject newParent)
Description copied from class: PDObject
Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

A concrete PDObject implementation supporting inheritance should implement this method.

Overrides:
setGenericParent in class PDObject
Parameters:
newParent - The new parent object.

setMediaBox

public void setMediaBox(CDSRectangle rect)
Set the rectangle in user space coordinates defining the physical page boundaries. user space is measured in 1/72 inch initially

Parameters:
rect - The rectangle defining the physical page boundaries

setRotate

public void setRotate(int rotate)
The number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a multiple of 90. If a value of 0 is set, which is the default, the field will be cleared.

Notice: This object and its children are affected on a change!

Parameters:
rotate - A multiple of 90, the value is not checked for a legal value

intarsys PDF library API

Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.