|
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.PDPage
public class PDPage
A single concrete page in a PDF document.
Nested Class Summary | |
---|---|
static class |
PDPage.MetaClass
The meta class implementation |
Field Summary | |
---|---|
static String |
COPY_SUFFIX
|
static COSName |
DK_Annots
|
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 PDPage.MetaClass |
META
The meta class instance |
static Set |
PAGE_ACTION_TRIGGERS
supported additional action triggers |
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 |
Fields inherited from interface de.intarsys.pdf.pd.IAdditionalActionSupport |
---|
DK_AA |
Method Summary | |
---|---|
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. |
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 |
dispose()
|
PDAdditionalActions |
getAdditionalActions()
|
List |
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. |
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()
return a PDCResourceDict. this is a wrapper around a COSDictionary that handles Resource specific details. |
Set |
getSupportedTriggerEvents()
|
void |
invalidateCaches()
Invalidate all local caches as the base object may have changed. |
boolean |
isPage()
Answer true if this is a single page node. |
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 |
setContentStream(CSContent contentStream)
Assign a new visual appearance to the page. |
void |
setResources(PDResources resources)
|
Methods inherited from class de.intarsys.pdf.pd.PDPageNode |
---|
getCropBox, getGenericParent, getMediaBox, getNextNode, getNodeIndex, 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, 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 |
---|
public static final PDPage.MetaClass META
public static String COPY_SUFFIX
public static final COSName DK_Annots
public static final COSName DK_PieceInfo
public static final COSName DK_Resources
public static final COSName DK_MediaBox
public static final COSName DK_CropBox
public static final COSName DK_Contents
public static final COSName DK_Metadata
public static final Set PAGE_ACTION_TRIGGERS
Method Detail |
---|
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 CSContent
public void cosAddContents(COSStream content)
COSStream
to the pages content
content
- The COSStream
to add to the pagepublic void cosPrependContents(COSStream content)
content
- The COSStream
to add to the pagepublic COSObject cosGetContents()
public COSDictionary cosGetPieceInfo()
public COSObject cosSetContents(COSObject content)
content
- the stream defining the page content
public COSDictionary cosSetPieceInfo(COSDictionary dict)
dict
- The piece info dictionary of the document.
public void dispose()
dispose
in class PDPageNode
public PDAdditionalActions getAdditionalActions()
getAdditionalActions
in interface IAdditionalActionSupport
public List 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 IContentStreamProvider
CSContent
defining the visual content of the page.public int getCount()
PDPageNode
getCount
in class PDPageNode
public PDAnnotation getFirstAnnotation()
PDPageNode
PDAnnotation
linked on this page.
getFirstAnnotation
in class PDPageNode
PDAnnotation
on the page or nullpublic 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 PDAnnotation getLastAnnotation()
PDPageNode
PDAnnotation
linked on this page.
getLastAnnotation
in class PDPageNode
PDAnnotation
on the page or nullpublic PDPageNode getLastNode()
PDPageNode
This may return null if the receiver is an empty collection.
getLastNode
in class PDPageNode
public PDPage getLastPage()
PDPageNode
getLastPage
in class PDPageNode
public 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 PDAnnotation
public PDPage getNextPage()
public PDPage getPageAt(int index)
PDPageNode
index
within the receivers subtree.
getPageAt
in class PDPageNode
index
- The page index
index
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 PDAnnotation
public PDPage getPreviousPage()
public PDResources getResources()
getResources
in interface IResourcesProvider
public Set getSupportedTriggerEvents()
getSupportedTriggerEvents
in interface IAdditionalActionSupport
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 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 IAdditionalActionSupport
public 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 IContentStreamProvider
contentStream
- The new visual appearance.public void setResources(PDResources resources)
setResources
in interface IResourcesProvider
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |