| Modifier and Type | Field and Description |
|---|---|
| private static final byte[] | |
| private static final Log | LOG
Log instance |
| private PDRectangle | |
| private final COSDictionary | |
| private PDResources | |
| private ResourceCache |
| Access | Constructor and Description |
|---|---|
| public | |
| public | PDPage(PDRectangle
The MediaBox of the page. mediaBox)Creates a new instance of PDPage for embedding. |
| public | PDPage(COSDictionary
A page dictionary in a PDF document. pageDictionary)Creates a new instance of PDPage for reading. |
| pack-priv | PDPage(COSDictionary
A page dictionary in a PDF document. pageDictionary, ResourceCache resourceCache)Creates a new instance of PDPage for reading. |
| Modifier and Type | Method and Description |
|---|---|
| private PDRectangle | |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public PDPageAdditionalActions | |
| public List | Returns: List of the PDAnnotation objects, never null. The returned list is backed by the annotations COSArray, so any adding or deleting in this list will change the document too.This will return a list of the annotations for this page. |
| public List | Returns: List of the PDAnnotation objects, never null. The returned list is backed by the annotations COSArray, so any adding or deleting in this list will change the document too.the annotation filter provided allowing to filter out specific annotations annotationFilter)This will return a list of the annotations for this page. |
| public PDRectangle | Returns: The ArtBox attribute.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. |
| public PDRectangle | getBBox()
Implements org. Returns the bounding box of the contents. |
| public PDRectangle | Returns: The BleedBox attribute.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. |
| public InputStream | Returns: An InputStream, never null. Multiple content streams are concatenated and separated with a newline. An empty stream is returned if the page doesn't have any content stream.Implements org. Returns the content stream(s) of this page as a single input stream. |
| public RandomAccessRead | getContentsForRandomAccess()
Implements org. Returns this stream's content, if any. |
| public RandomAccessRead | getContentsForStreamParsing()
Overrides default org. Returns this stream's content, if any. |
| public Iterator | Returns: content stream iteratorReturns the content streams which make up this page. |
| public COSDictionary | Returns: The cos object that matches this Java object.Implements org. Convert this standard java object to a COS object. |
| public PDRectangle | Returns: the cropbox of the pageA rectangle, expressed in default user space units, defining the visible region of default user space. |
| public Matrix | getMatrix()
Implements org. Returns the matrix which transforms from the stream's space to user space. |
| public PDRectangle | Returns: the media box of the pageA 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. |
| public PDMetadata | Returns: The metadata for this object.Get the metadata that is part of the document catalog. |
| public ResourceCache | Returns: the resource cache of the current pageReturns the resource cache associated with this page, or null if there is none. |
| public PDResources | getResources()
Implements org. A dictionary containing any resources required by the page. |
| public int | Returns: The rotation angle in degrees in normalized form (0, 90, 180 or 270) or 0 if invalid or not set at this level.Returns the rotation angle in degrees by which the page should be rotated clockwise when displayed or printed. |
| public int | Returns: the integer key of the page's entry in the structural parent tree or -1 if there isn't any.This will get the key of this Page in the structural parent tree. |
| public List | Returns: A list of article threads on this page, never null. The returned list is backed by the beads COSArray, so any adding or deleting in this list will change the document too.This will get a list of PDThreadBead objects, which are article threads in the document. |
| public PDTransition | Returns: The page transition associated with this page or null if no transition is defined
|
| public PDRectangle | Returns: The TrimBox attribute.A rectangle, expressed in default user space units, defining the intended dimensions of the finished page after trimming. |
| public float | |
| public List | |
| public boolean | Returns: true if the page has a non empty content stream, otherwise falseReturns true if this page has one or more content streams. |
| public int | |
| public void | |
| public void | setAnnotations(List<PDAnnotation>
The new list of annotations. annotations)This will set the list of annotations. |
| public void | |
| public void | setBleedBox(PDRectangle
The new BleedBox for this page. bleedBox)This will set the BleedBox for this page. |
| public void | |
| public void | setContents(List<PDStream>
Array of new contents of the page. contents)This will set the contents of this page. |
| public void | setCropBox(PDRectangle
The new CropBox for this page. cropBox)This will set the CropBox for this page. |
| public void | setMediaBox(PDRectangle
The new mediaBox for this page. mediaBox)This will set the mediaBox for this page. |
| public void | |
| public void | setResources(PDResources
The new resources for this page. resources)This will set the resources for this page. |
| public void | setRotation(int
The new rotation for this page in degrees. rotation)This will set the rotation for this page. |
| public void | setStructParents(int
The new key for this page. structParents)This will set the key for this page in the structural parent tree. |
| public void | setThreadBeads(List<PDThreadBead>
A list of PDThreadBead objects or null. beads)This will set the list of thread beads. |
| public void | |
| public void | setTransition(PDTransition
The new transition to set on this page. transition, float 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. duration)Convenient method to set a transition and the display duration |
| public void | setTrimBox(PDRectangle
The new TrimBox for this page. trimBox)This will set the TrimBox for this page. |
| public void | setUserUnit(float
throws IllegalArgumentException if the parameter is not positive. userUnit)Get the user unit. |
| public void | setViewports(List<PDViewportDictionary>
A list of viewports, or null if the entry is to be deleted. viewports)Set the viewports. |
| DELIMITER | back to summary |
|---|---|
| private static final byte[] DELIMITER | |
| LOG | back to summary |
|---|---|
| private static final Log LOG Log instance | |
| mediaBox | back to summary |
|---|---|
| private PDRectangle mediaBox | |
| page | back to summary |
|---|---|
| private final COSDictionary page | |
| pageResources | back to summary |
|---|---|
| private PDResources pageResources | |
| resourceCache | back to summary |
|---|---|
| private ResourceCache resourceCache | |
| PDPage | back to summary |
|---|---|
| public PDPage() Creates a new PDPage instance for embedding, with a size of U.S. Letter (8.5 x 11 inches). | |
| PDPage | back to summary |
|---|---|
| public PDPage(PDRectangle mediaBox) Creates a new instance of PDPage for embedding.
| |
| PDPage | back to summary |
|---|---|
| public PDPage(COSDictionary pageDictionary) Creates a new instance of PDPage for reading.
| |
| PDPage | back to summary |
|---|---|
| pack-priv PDPage(COSDictionary pageDictionary, ResourceCache resourceCache) Creates a new instance of PDPage for reading.
| |
| clipToMediaBox | back to summary |
|---|---|
| private PDRectangle clipToMediaBox(PDRectangle box) Clips the given box to the bounds of the media box. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getActions | back to summary |
|---|---|
| public PDPageAdditionalActions getActions() Get the page actions.
| |
| getAnnotations | back to summary |
|---|---|
| public List This will return a list of the annotations for this page.
| |
| getAnnotations | back to summary |
|---|---|
| public List This will return a list of the annotations for this page.
| |
| getArtBox | back to summary |
|---|---|
| public 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.
| |
| getBBox | back to summary |
|---|---|
| public PDRectangle getBBox() Implements org. Doc from org. Returns the bounding box of the contents.
| |
| getBleedBox | back to summary |
|---|---|
| public 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. The default is the CropBox.
| |
| getContents | back to summary |
|---|---|
| public InputStream getContents() throws IOException Implements org. Returns the content stream(s) of this page as a single input stream.
| |
| getContentsForRandomAccess | back to summary |
|---|---|
| public RandomAccessRead getContentsForRandomAccess() throws IOException Implements org. Doc from org. Returns this stream's content, if any.
| |
| getContentsForStreamParsing | back to summary |
|---|---|
| public RandomAccessRead getContentsForStreamParsing() throws IOException Overrides default org. Doc from org. Returns this stream's content, if any. The random access capabilities of the returned instance is supposed to be limited. Peek/rewind operations are limited to a small range of data and not the whole set of data. Seek operations aren't supported at all.
| |
| getContentStreams | back to summary |
|---|---|
| public Iterator Returns the content streams which make up this page. | |
| getCOSObject | back to summary |
|---|---|
| public COSDictionary getCOSObject() Implements org. Convert this standard java object to a COS object.
| |
| getCropBox | back to summary |
|---|---|
| public PDRectangle getCropBox() A rectangle, expressed in default user space units, defining the visible region of default user space. When the page is displayed or printed, its contents are to be clipped (cropped) to this rectangle.
| |
| getMatrix | back to summary |
|---|---|
| public Matrix getMatrix() Implements org. Doc from org. Returns the matrix which transforms from the stream's space to user space. | |
| getMediaBox | back to summary |
|---|---|
| public 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.
| |
| getMetadata | back to summary |
|---|---|
| public PDMetadata getMetadata() Get the metadata that is part of the document catalog. This will return null if there is no meta data for this object.
| |
| getResourceCache | back to summary |
|---|---|
| public ResourceCache getResourceCache() Returns the resource cache associated with this page, or null if there is none.
| |
| getResources | back to summary |
|---|---|
| public PDResources getResources() Implements org. A dictionary containing any resources required by the page.
| |
| getRotation | back to summary |
|---|---|
| public int getRotation() Returns the rotation angle in degrees by which the page should be rotated clockwise when displayed or printed. Valid values in a PDF must be a multiple of 90.
| |
| getStructParents | back to summary |
|---|---|
| public int getStructParents() This will get the key of this Page in the structural parent tree.
| |
| getThreadBeads | back to summary |
|---|---|
| public List This will get a list of PDThreadBead objects, which are article threads in the document. This will return an empty list if there are no thread beads.
| |
| getTransition | back to summary |
|---|---|
public PDTransition getTransition()
| |
| getTrimBox | back to summary |
|---|---|
| public PDRectangle getTrimBox() A rectangle, expressed in default user space units, defining the intended dimensions of the finished page after trimming. The default is the CropBox.
| |
| getUserUnit | back to summary |
|---|---|
| public float getUserUnit() Get the user unit. This is a positive number that shall give the size of default user space units, in multiples of 1/72 inch, or 1 if it hasn't been set. This is supported by PDF 1.6 and higher.
| |
| getViewports | back to summary |
|---|---|
| public List Get the viewports.
| |
| hasContents | back to summary |
|---|---|
| public boolean hasContents() Returns true if this page has one or more content streams.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| setActions | back to summary |
|---|---|
| public void setActions(PDPageAdditionalActions actions) Set the page actions.
| |
| setAnnotations | back to summary |
|---|---|
| public void setAnnotations(List<PDAnnotation> annotations) This will set the list of annotations. Although this is optional, you should take care that
any newly created annotations link back to this page by calling
| |
| setArtBox | back to summary |
|---|---|
| public void setArtBox(PDRectangle artBox) This will set the ArtBox for this page.
| |
| setBleedBox | back to summary |
|---|---|
| public void setBleedBox(PDRectangle bleedBox) This will set the BleedBox for this page.
| |
| setContents | back to summary |
|---|---|
| public void setContents(PDStream contents) This will set the contents of this page.
| |
| setContents | back to summary |
|---|---|
| public void setContents(List<PDStream> contents) This will set the contents of this page. | |
| setCropBox | back to summary |
|---|---|
| public void setCropBox(PDRectangle cropBox) This will set the CropBox for this page.
| |
| setMediaBox | back to summary |
|---|---|
| public void setMediaBox(PDRectangle mediaBox) This will set the mediaBox for this page.
| |
| setMetadata | back to summary |
|---|---|
| public void setMetadata(PDMetadata meta) Set the metadata for this object. This can be null.
| |
| setResources | back to summary |
|---|---|
| public void setResources(PDResources resources) This will set the resources for this page.
| |
| setRotation | back to summary |
|---|---|
| public void setRotation(int rotation) This will set the rotation for this page.
| |
| setStructParents | back to summary |
|---|---|
| public void setStructParents(int structParents) This will set the key for this page in the structural parent tree.
| |
| setThreadBeads | back to summary |
|---|---|
| public void setThreadBeads(List<PDThreadBead> beads) This will set the list of thread beads.
| |
| setTransition | back to summary |
|---|---|
public void setTransition(PDTransition transition)
| |
| setTransition | back to summary |
|---|---|
| public void setTransition(PDTransition transition, float duration) Convenient method to set a transition and the display duration
| |
| setTrimBox | back to summary |
|---|---|
| public void setTrimBox(PDRectangle trimBox) This will set the TrimBox for this page.
| |
| setUserUnit | back to summary |
|---|---|
| public void setUserUnit(float userUnit) Get the user unit. This is a positive number that shall give the size of default user space units, in multiples of 1/72 inch. This is supported by PDF 1.6 and higher.
| |
| setViewports | back to summary |
|---|---|
| public void setViewports(List<PDViewportDictionary> viewports) Set the viewports.
| |