PDContentStream
, COSObjectable
public class PDPage extends java.lang.Object implements COSObjectable, PDContentStream
Constructor | 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 | Description |
---|---|---|
boolean |
equals(java.lang.Object other) |
|
PDPageAdditionalActions |
getActions() |
Get the page actions.
|
java.util.List<PDAnnotation> |
getAnnotations() |
This will return a list of the annotations for this page.
|
java.util.List<PDAnnotation> |
getAnnotations(AnnotationFilter annotationFilter) |
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.
|
java.io.InputStream |
getContents() |
Returns the content stream(s) of this page as a single input stream.
|
java.util.Iterator<PDStream> |
getContentStreams() |
Returns the content streams which make up this page.
|
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.
|
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.
|
ResourceCache |
getResourceCache() |
Returns the resource cache associated with this page, or null if there is none.
|
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.
|
int |
getStructParents() |
This will get the key of this Page in the structural parent tree.
|
java.util.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.
|
java.util.List<PDViewportDictionary> |
getViewports() |
Get the viewports.
|
boolean |
hasContents() |
Returns true if this page has contents.
|
int |
hashCode() |
|
void |
setActions(PDPageAdditionalActions actions) |
Set the page actions.
|
void |
setAnnotations(java.util.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(java.util.List<PDStream> contents) |
This will set the contents of 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(java.util.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.
|
void |
setViewports(java.util.List<PDViewportDictionary> viewports) |
Set the viewports.
|
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 COSObjectable
public java.util.Iterator<PDStream> getContentStreams()
public java.io.InputStream getContents() throws java.io.IOException
getContents
in interface PDContentStream
java.io.IOException
- If the stream could not be readpublic boolean hasContents()
public PDResources getResources()
getResources
in interface PDContentStream
public void setResources(PDResources resources)
resources
- The new resources for this page.public int getStructParents()
public void setStructParents(int structParents)
structParents
- The new key for this page.public PDRectangle getBBox()
PDContentStream
getBBox
in interface PDContentStream
public Matrix getMatrix()
PDContentStream
getMatrix
in interface PDContentStream
public 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 void setRotation(int rotation)
rotation
- The new rotation for this page in degrees.public void setContents(PDStream contents)
contents
- The new contents of the page.public void setContents(java.util.List<PDStream> contents)
contents
- Array of new contents of the page.public java.util.List<PDThreadBead> getThreadBeads()
public void setThreadBeads(java.util.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 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 java.util.List<PDAnnotation> getAnnotations() throws java.io.IOException
java.io.IOException
- If there is an error while creating the annotation list.public java.util.List<PDAnnotation> getAnnotations(AnnotationFilter annotationFilter) throws java.io.IOException
annotationFilter
- the annotation filter provided allowing to filter out specific annotationsjava.io.IOException
- If there is an error while creating the annotation list.public void setAnnotations(java.util.List<PDAnnotation> annotations)
annotations
- The new list of annotations.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ResourceCache getResourceCache()
public java.util.List<PDViewportDictionary> getViewports()
public void setViewports(java.util.List<PDViewportDictionary> viewports)
viewports
- A list of viewports, or null if the entry is to be deleted.Copyright © 2002–2018. All rights reserved.