public class PDPage extends Object implements COSObjectable, PDContentStream
| Constructor and Description |
|---|
PDPage()
Creates a new PDPage instance for embedding, with a size of U.S.
|
PDPage(COSDictionary pageDictionary)
Creates a new instance of PDPage for reading.
|
PDPage(PDRectangle mediaBox)
Creates a new instance of PDPage for embedding.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
PDPageAdditionalActions |
getActions()
Get the page actions.
|
List<PDAnnotation> |
getAnnotations()
This will return a list of the Annotations for this page.
|
PDRectangle |
getArtBox()
A rectangle, expressed in default user space units, defining the extent of the page's
meaningful content (including potential white space) as intended by the page's creator The
default is the CropBox.
|
PDRectangle |
getBBox()
Returns the bounding box of the contents.
|
PDRectangle |
getBleedBox()
A rectangle, expressed in default user space units, defining the region to which the contents
of the page should be clipped when output in a production environment.
|
COSStream |
getContentStream()
Returns the underlying COS stream.
|
COSDictionary |
getCOSObject()
Convert this standard java object to a COS object.
|
PDRectangle |
getCropBox()
A rectangle, expressed in default user space units, defining the visible region of default
user space.
|
PDResources |
getInheritedResources() |
Matrix |
getMatrix()
Returns the matrix which transforms from the stream's space to user space.
|
PDRectangle |
getMediaBox()
A rectangle, expressed in default user space units, defining the boundaries of the physical
medium on which the page is intended to be displayed or printed.
|
PDMetadata |
getMetadata()
Get the metadata that is part of the document catalog.
|
PDResources |
getPageResources() |
PDNavigationNode |
getPresSteps() |
PDResources |
getResources()
A dictionary containing any resources required by the page.
|
int |
getRotation()
Returns the rotation angle in degrees by which the page should be rotated
clockwise when displayed or printed.
|
PDStream |
getStream()
This will get the contents of the PDF Page, in the case that the contents of the page is an
array then then the entire array of streams will be be wrapped and appear as a single stream.
|
int |
getStructParents()
This will get the key of this Page in the structural parent tree.
|
List<PDThreadBead> |
getThreadBeads()
This will get a list of PDThreadBead objects, which are article threads in the document.
|
PDTransition |
getTransition() |
PDRectangle |
getTrimBox()
A rectangle, expressed in default user space units, defining the intended dimensions of the
finished page after trimming.
|
int |
hashCode() |
boolean |
hasRotation() |
void |
setActions(PDPageAdditionalActions actions)
Set the page actions.
|
void |
setAnnotations(List<PDAnnotation> annotations)
This will set the list of annotations.
|
void |
setArtBox(PDRectangle artBox)
This will set the ArtBox for this page.
|
void |
setBleedBox(PDRectangle bleedBox)
This will set the BleedBox for this page.
|
void |
setContents(PDStream contents)
This will set the contents of this page.
|
void |
setCropBox(PDRectangle cropBox)
This will set the CropBox for this page.
|
void |
setMediaBox(PDRectangle mediaBox)
This will set the mediaBox for this page.
|
void |
setMetadata(PDMetadata meta)
Set the metadata for this object.
|
void |
setResources(PDResources resources)
This will set the resources for this page.
|
void |
setRotation(int rotation)
This will set the rotation for this page.
|
void |
setStructParents(int structParents)
This will set the key for this page in the structural parent tree.
|
void |
setThreadBeads(List<PDThreadBead> beads)
This will set the list of thread beads.
|
void |
setTransition(PDTransition transition) |
void |
setTransition(PDTransition transition,
float duration)
Convenient method to set a transition and the display duration
|
void |
setTrimBox(PDRectangle trimBox)
This will set the TrimBox for this page.
|
public PDPage()
public PDPage(PDRectangle mediaBox)
mediaBox - The MediaBox of the page.public PDPage(COSDictionary pageDictionary)
pageDictionary - A page dictionary in a PDF document.public COSDictionary getCOSObject()
getCOSObject in interface COSObjectablepublic COSStream getContentStream()
PDContentStreamgetContentStream in interface PDContentStreampublic PDResources getResources()
getResources in interface PDContentStreampublic void setResources(PDResources resources)
resources - The new resources for this page.public PDResources getPageResources()
public PDResources getInheritedResources()
public int getStructParents()
public void setStructParents(int structParents)
structParents - The new key for this page.public PDRectangle getBBox()
PDContentStreamgetBBox in interface PDContentStreampublic Matrix getMatrix()
PDContentStreamgetMatrix in interface PDContentStreampublic PDRectangle getMediaBox()
public void setMediaBox(PDRectangle mediaBox)
mediaBox - The new mediaBox for this page.public PDRectangle getCropBox()
public void setCropBox(PDRectangle cropBox)
cropBox - The new CropBox for this page.public PDRectangle getBleedBox()
public void setBleedBox(PDRectangle bleedBox)
bleedBox - The new BleedBox for this page.public PDRectangle getTrimBox()
public void setTrimBox(PDRectangle trimBox)
trimBox - The new TrimBox for this page.public PDRectangle getArtBox()
public void setArtBox(PDRectangle artBox)
artBox - The new ArtBox for this page.public int getRotation()
public boolean hasRotation()
public void setRotation(int rotation)
rotation - The new rotation for this page in degrees.public PDStream getStream() throws IOException
IOException - If there is an error obtaining the stream.public void setContents(PDStream contents)
contents - The new contents of the page.public List<PDThreadBead> getThreadBeads()
public void setThreadBeads(List<PDThreadBead> beads)
beads - A list of PDThreadBead objects or null.public PDMetadata getMetadata()
public void setMetadata(PDMetadata meta)
meta - The meta data for this object.public PDPageAdditionalActions getActions()
public PDNavigationNode getPresSteps()
public void setActions(PDPageAdditionalActions actions)
actions - The actions for the page.public PDTransition getTransition()
public void setTransition(PDTransition transition)
transition - The new transition to set on this page.public void setTransition(PDTransition transition, float duration)
transition - The new transition to set on this page.duration - The maximum length of time, in seconds, that the page shall be displayed during presentations
before the viewer application shall automatically advance to the next page.public List<PDAnnotation> getAnnotations() throws IOException
IOException - If there is an error while creating the annotation list.public void setAnnotations(List<PDAnnotation> annotations)
annotations - The new list of annotations.Copyright © 2015–2021 The veraPDF Consortium. All rights reserved.