public class PDPage extends PDPageNode implements IAdditionalActionSupport, IContentStreamProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
PDPage.MetaClass
The meta class implementation
|
| Modifier and Type | Field and Description |
|---|---|
static String |
COPY_SUFFIX |
static COSName |
DK_Annots |
static COSName |
DK_ArtBox |
static COSName |
DK_BleedBox |
static COSName |
DK_Contents |
static COSName |
DK_CropBox |
static COSName |
DK_MediaBox |
static COSName |
DK_Metadata |
static COSName |
DK_PieceInfo |
static COSName |
DK_Resources |
static COSName |
DK_TemplateInstantiated |
static COSName |
DK_TrimBox |
static PDPage.MetaClass |
META
The meta class instance
|
static Set |
PAGE_ACTION_TRIGGERS
supported additional action triggers
|
CN_Type_Page, CN_Type_Pages, DK_Parent, DK_RotateDK_Subtype, DK_TypeDK_AA| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotation(PDAnnotation annot)
Add a
PDAnnotation to the collection of annotations on the
receiver page. |
void |
addContentStream(CSContent contentStream)
Add a
CSContent stream to this. |
void |
cosAddContents(COSStream content)
Append
COSStream to the pages content |
COSObject |
cosGetContents()
The /Contents entry
|
COSDictionary |
cosGetPieceInfo()
The piece info dictionary of the document.
|
COSName |
cosGetTemplateInstantiated() |
void |
cosPrependContents(COSStream content)
Prepend contents to the pages content.
|
COSObject |
cosSetContents(COSObject content)
Set the /Contents for the page
|
COSDictionary |
cosSetPieceInfo(COSDictionary dict)
Set the piece info dictionary of the document.
|
void |
cosSetTemplateInstantiated(COSName templateName) |
void |
dispose() |
PDAdditionalActions |
getAdditionalActions() |
List<PDAnnotation> |
getAnnotations()
Get a list of all
PDAnnotation objects that are referenced in
this page. |
PDApplicationData |
getApplicationData(String name)
The
PDApplicationData associated with name on the
page. |
CDSRectangle |
getArtBox()
Returns the rectangle (in default user space units) defines defines the
extent of the page’s meaningful content (including potential white space)
as intended by the page’s creator (PDF 1.3).
|
CDSRectangle |
getBleedBox()
Returns the rectangle (in default user space units) defines the region to
which the contents of this page shall be clipped when output in a
production environment (PDF 1.3).
|
CSContent |
getContentStream()
The
CSContent defining the visual content of the page. |
int |
getCount()
The total number of pages represented by this node.
|
PDAnnotation |
getFirstAnnotation()
The first
PDAnnotation linked on this page. |
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.
|
PDAnnotation |
getLastAnnotation()
The last
PDAnnotation linked on this page. |
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.
|
PDAnnotation |
getNextAnnotation(PDAnnotation annot)
The
PDAnnotation following the given PDAnnotation annot
or null, if annot was the last one in the list or does't
exist on this page. |
PDPage |
getNextPage()
The next page after the receiver.
|
PDPage |
getPageAt(int index)
The page at
index within the receivers subtree. |
PDAnnotation |
getPreviousAnnotation(PDAnnotation annot)
Returns the
PDAnnotation preceding the given PDAnnotation
annot or null, if annot was the first one in the list or does't exist on
this page. |
PDPage |
getPreviousPage()
Get the previous page before the receiver.
|
PDResources |
getResources() |
Set |
getSupportedTriggerEvents() |
CDSRectangle |
getTrimBox()
Returns the rectangle (in default user space units) defines the intended
dimensions of the finished page after trimming (PDF 1.3).
|
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. |
void |
prependContentStream(CSContent contentStream)
Prepend a
CSContent stream to this. |
void |
removeAnnotation(PDAnnotation annot)
Remove a
PDAnnotation from the page. |
void |
removeApplicationData(String name)
Remove the
PDApplicationData associated with name
from this page. |
void |
setAdditionalActions(PDAdditionalActions actions) |
void |
setApplicationData(String name,
PDApplicationData data)
Associate a
PDApplicationData instance with this using
name. |
void |
setArtBox(CDSRectangle rect)
Sets the rectangle (in default user space units) that defines the extent
of the page’s meaningful content (including potential white space) as
intended by the page’s creator (PDF 1.3).
|
void |
setBleedBox(CDSRectangle rect)
Sets the rectangle (in default user space units) that defines the region
to which the contents of this page shall be clipped when output in a
production environment (PDF 1.3).
|
void |
setContentStream(CSContent contentStream)
Assign a new visual appearance to the page.
|
void |
setResources(PDResources resources) |
void |
setTrimBox(CDSRectangle rect)
Sets the rectangle (in default user space units) that defines the
intended dimensions of the finished page after trimming (PDF 1.3).
|
getCropBox, getGenericParent, getMediaBox, getNextNode, getNodeIndex, getParent, getPreviousNode, getRotate, setCropBox, setGenericParent, setMediaBox, setRotatecosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, getGenericChildren, 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 String COPY_SUFFIX
public static final COSName DK_Annots
public static final COSName DK_Contents
public static final COSName DK_MediaBox
public static final COSName DK_CropBox
public static final COSName DK_BleedBox
public static final COSName DK_TrimBox
public static final COSName DK_ArtBox
public static final COSName DK_Metadata
public static final COSName DK_PieceInfo
public static final COSName DK_Resources
public static final COSName DK_TemplateInstantiated
public static final PDPage.MetaClass META
public static final Set PAGE_ACTION_TRIGGERS
public void addAnnotation(PDAnnotation annot)
PDAnnotation to the collection of annotations on the
receiver page.annot - The PDAnnotation to add to the page.public void addContentStream(CSContent contentStream)
CSContent stream to this.contentStream - The new CSContentpublic void cosAddContents(COSStream content)
COSStream to the pages contentcontent - The COSStream to add to the pagepublic COSObject cosGetContents()
public COSDictionary cosGetPieceInfo()
public COSName cosGetTemplateInstantiated()
public void cosPrependContents(COSStream content)
content - The COSStream to add to the pagepublic COSObject cosSetContents(COSObject content)
content - the stream defining the page contentpublic COSDictionary cosSetPieceInfo(COSDictionary dict)
dict - The piece info dictionary of the document.public void cosSetTemplateInstantiated(COSName templateName)
public void dispose()
dispose in class PDPageNodepublic PDAdditionalActions getAdditionalActions()
getAdditionalActions in interface IAdditionalActionSupportpublic List<PDAnnotation> getAnnotations()
PDAnnotation objects that are referenced in
this page.PDAnnotation objects that are referenced in
this page or null if none exist.public PDApplicationData getApplicationData(String name)
PDApplicationData associated with name on the
page.name - The name of the PDApplicationData to lookup.PDApplicationData associated with name
on the page.public CSContent getContentStream()
CSContent defining the visual content of the page.getContentStream in interface IContentStreamProviderCSContent defining the visual content of the page.public int getCount()
PDPageNodegetCount in class PDPageNodepublic PDAnnotation getFirstAnnotation()
PDPageNodePDAnnotation linked on this page.getFirstAnnotation in class PDPageNodePDAnnotation on the page or nullpublic PDPageNode getFirstNode()
PDPageNodeThis may return null if the receiver is an empty collection.
getFirstNode in class PDPageNodepublic PDPage getFirstPage()
PDPageNodegetFirstPage in class PDPageNodepublic PDAnnotation getLastAnnotation()
PDPageNodePDAnnotation linked on this page.getLastAnnotation in class PDPageNodePDAnnotation on the page or nullpublic PDPageNode getLastNode()
PDPageNodeThis may return null if the receiver is an empty collection.
getLastNode in class PDPageNodepublic PDPage getLastPage()
PDPageNodegetLastPage in class PDPageNodepublic PDAnnotation getNextAnnotation(PDAnnotation annot)
PDAnnotation following the given PDAnnotation annot
or null, if annot was the last one in the list or does't
exist on this page.annot - a PDAnnotationpublic PDPage getNextPage()
public PDPage getPageAt(int index)
PDPageNodeindex within the receivers subtree.getPageAt in class PDPageNodeindex - The page indexindex within the receivers subtree.public PDAnnotation getPreviousAnnotation(PDAnnotation annot)
PDAnnotation preceding the given PDAnnotation
annot or null, if annot was the first one in the list or does't exist on
this page.annot - a PDAnnotationpublic PDPage getPreviousPage()
public PDResources getResources()
getResources in interface IResourcesProviderpublic Set getSupportedTriggerEvents()
getSupportedTriggerEvents in interface IAdditionalActionSupportpublic 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 void prependContentStream(CSContent contentStream)
CSContent stream to this.contentStream - The new CSContentpublic void removeAnnotation(PDAnnotation annot)
PDAnnotation from the page.annot - The PDAnnotation to remove from the page.public void removeApplicationData(String name)
PDApplicationData associated with name
from this page.name - The name of the application data object to be removed.public void setAdditionalActions(PDAdditionalActions actions)
setAdditionalActions in interface IAdditionalActionSupportpublic void setApplicationData(String name, PDApplicationData data)
PDApplicationData instance with this using
name.name - The name for the PDApplicationData instance within
this.data - The PDApplicationData instance.public void setContentStream(CSContent contentStream)
setContentStream in interface IContentStreamProvidercontentStream - The new visual appearance.public void setResources(PDResources resources)
setResources in interface IResourcesProviderpublic void setBleedBox(CDSRectangle rect)
rect - the rectangle that defines the bleed boxpublic CDSRectangle getBleedBox()
public void setTrimBox(CDSRectangle rect)
rect - the rectangle that defines the trim boxpublic CDSRectangle getTrimBox()
public void setArtBox(CDSRectangle rect)
rect - the rectangle that defines the art boxpublic CDSRectangle getArtBox()
Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.