public class PDFPage extends PDFBuffer
Modifier and Type | Field and Description |
---|---|
static byte |
OPACITY_FILL_ONLY |
static byte |
OPACITY_SHAPE |
static byte |
OPACITY_STROKE_AND_FILL |
static byte |
OPACITY_STROKE_ONLY |
Constructor and Description |
---|
PDFPage(PDFFile pFile)
Creates a PDF page for the page tree and pfile.
|
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(PDFAnnotation annot)
Adds an annotation to the page.
|
java.lang.String |
addColorspace(java.lang.Object cspace)
Adds a new colorspace to the resource dict and returns the name by which it's referred.
|
void |
addExtGState(java.lang.String aName,
java.util.Map aMap)
Adds a named graphics state parameter dict to the ExtGState dict for this page.
|
java.lang.String |
addPattern(java.lang.Object aPattern)
Adds a new pattern to the resource dict and returns the name by which it's referred.
|
void |
closeContents(RMPDFWriter aWriter)
Caches compressed contents into _stream and releases contents for efficiency.
|
PDFAnnotation |
getAnnotation(int anIndex)
Returns the specific page annotation at the given index.
|
int |
getAnnotationCount()
Returns the number of annotations.
|
java.util.Map |
getExtGStateMap()
Returns the ExtGState dict for this page.
|
java.util.Map |
getResourceMap(java.lang.String aResourceName)
Returns the named resource dict for this page.
|
void |
grestore()
Restores the last graphics state of the writer.
|
void |
gsave()
Saves the current graphics state of the writer.
|
void |
resolvePageReferences(PDFPagesTree pages)
Resolves page references for page annotations.
|
void |
setCropBox(RMRect aRect)
Sets the crop box for the page.
|
void |
setFillColor(RMColor aColor)
Sets the given color to be the current fill color.
|
void |
setLineCap(int aLineCap)
Sets the line cap: 0=butt, 1=round, 2=square.
|
void |
setLineJoin(int aLineJoin)
Sets the line join: 0=miter, 1=round, 2=bevel.
|
void |
setMediaBox(RMRect aRect)
Sets the media box for the page.
|
void |
setOpacity(float anOpacity,
byte coverage)
Sets the opacity to be the following value, for stroke operations, fill operations or both.
|
void |
setStrokeColor(RMColor aColor)
Sets the given color to be the current stroke color.
|
void |
setStrokeWidth(float aWidth)
Sets the given line width to be the current line width.
|
void |
writePDF(RMPDFWriter aWriter)
Writes the page contents to the pdf buffer.
|
public static final byte OPACITY_STROKE_ONLY
public static final byte OPACITY_STROKE_AND_FILL
public static final byte OPACITY_FILL_ONLY
public static final byte OPACITY_SHAPE
public PDFPage(PDFFile pFile)
public void setMediaBox(RMRect aRect)
public void setCropBox(RMRect aRect)
public void setFillColor(RMColor aColor)
public void setStrokeColor(RMColor aColor)
public void setStrokeWidth(float aWidth)
public void setLineCap(int aLineCap)
public void setLineJoin(int aLineJoin)
public void setOpacity(float anOpacity, byte coverage)
public void gsave()
public void grestore()
public int getAnnotationCount()
public PDFAnnotation getAnnotation(int anIndex)
public void addAnnotation(PDFAnnotation annot)
public java.util.Map getResourceMap(java.lang.String aResourceName)
public java.util.Map getExtGStateMap()
public void addExtGState(java.lang.String aName, java.util.Map aMap)
public java.lang.String addColorspace(java.lang.Object cspace)
public java.lang.String addPattern(java.lang.Object aPattern)
public void resolvePageReferences(PDFPagesTree pages)
public void closeContents(RMPDFWriter aWriter)
public void writePDF(RMPDFWriter aWriter)