public class PDFPage extends PDFResourceContext
There is one of these for every page in a PDF document. The object specifies the dimensions of the page and references a /Resources object, a contents stream and the page's parent in the page hierarchy.
| Modifier and Type | Field and Description |
|---|---|
protected int |
pageIndex
the page index (zero-based)
|
entries, order| Constructor and Description |
|---|
PDFPage(PDFResources resources,
int pageIndex,
java.awt.geom.Rectangle2D mediaBox,
java.awt.geom.Rectangle2D cropBox,
java.awt.geom.Rectangle2D bleedBox,
java.awt.geom.Rectangle2D trimBox)
Create a /Page object
|
| Modifier and Type | Method and Description |
|---|---|
int |
getPageIndex() |
java.lang.Integer |
getStructParents()
Returns the value of the StructParents entry.
|
void |
setBleedBox(java.awt.geom.Rectangle2D box)
Sets the "BleedBox" entry
|
void |
setContents(PDFReference contents)
set this page contents
|
void |
setCropBox(java.awt.geom.Rectangle2D box)
Sets the "CropBox" entry
|
void |
setMediaBox(java.awt.geom.Rectangle2D box)
Sets the "MediaBox" entry
|
void |
setParent(PDFPages parent)
set this page's parent
|
void |
setStructParents(int structParents)
Sets the "StructParents" value.
|
void |
setTabs(PDFName value)
Specifies the tab order for annotations on a page.
|
void |
setTransition(int dur,
TransitionDictionary tr)
Set the transition dictionary and duration.
|
void |
setTrimBox(java.awt.geom.Rectangle2D box)
Sets the "TrimBox" entry
|
addAnnotation, addGState, addPattern, addShading, addXObject, getAnnotations, getGStates, getPatterns, getPDFResources, getShadings, getXObjectscontainsKey, get, getChildren, getChildren, keySet, output, put, put, remove, writeDictionarycontentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF, toPDFStringpublic PDFPage(PDFResources resources, int pageIndex, java.awt.geom.Rectangle2D mediaBox, java.awt.geom.Rectangle2D cropBox, java.awt.geom.Rectangle2D bleedBox, java.awt.geom.Rectangle2D trimBox)
resources - the /Resources objectpageIndex - the page's zero-based index (or -1 if the page number is auto-determined)mediaBox - the MediaBoxcropBox - the CropBox. If null, mediaBox is used.bleedBox - the BleedBox. If null, cropBox is used.trimBox - the TrimBox. If null, bleedBox is used.public void setMediaBox(java.awt.geom.Rectangle2D box)
box - the media rectanglepublic void setCropBox(java.awt.geom.Rectangle2D box)
box - the bleed rectanglepublic void setBleedBox(java.awt.geom.Rectangle2D box)
box - the bleed rectanglepublic void setTrimBox(java.awt.geom.Rectangle2D box)
box - the trim rectanglepublic void setContents(PDFReference contents)
contents - the contents of the pagepublic void setParent(PDFPages parent)
parent - the /Pages object that is this page's parentpublic void setTransition(int dur,
TransitionDictionary tr)
dur - the duration in secondstr - the transition dictionarypublic int getPageIndex()
public void setStructParents(int structParents)
structParents - the integer key of this object's entry in the structural parent tree.public java.lang.Integer getStructParents()
null if the entry has not been setpublic void setTabs(PDFName value)
value - one of the allowed values (see PDF 1.5)Copyright 1999-2022 The Apache Software Foundation. All Rights Reserved.