Package com.reportmill.pdf
Class PDFPage
- java.lang.Object
-
- com.reportmill.base.RMObject
-
- com.reportmill.pdf.PDFPage
-
- All Implemented Interfaces:
RMArchiver.Archiving,java.lang.Cloneable
public class PDFPage extends RMObject
All drawing happens in PDFPage object. Contents is a stream to which all the marking functions get appended.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnnotation(PDFAnnotation annot)Adds an annotation to the page.java.lang.StringaddColorspace(java.lang.Object cspace)Adds a new colorspace to the resource dict and returns the name by which it's referredvoidaddExtGState(java.lang.String aName, java.util.Map aMap)Adds a named graphics state parameter dict to the ExtGState dict for this page.java.lang.StringaddPattern(java.lang.Object pattern)Adds a new pattern to the resource dict and returns the name by which it's referredvoidcloseContents()Caches compressed contents into _stream and releases contents for efficiency.PDFAnnotationgetAnnotation(int anIndex)Returns the specific page annotation at the given index.PDFPageBuffergetContents()Returns the page contents buffer.java.util.MapgetExtGStateMap()Returns the ExtGState dict for this page.java.util.MapgetResourceMap(java.lang.String resourceName)Returns the named resource dict for this page.voidresolvePageReferences(PDFPagesTree pages)Resolves page references for page annotations.voidsetCropBox(RMRect aRect)Sets the crop box for the page.voidsetMediaBox(RMRect aRect)Sets the media box for the page.voidwritePDF(PDFFile pdfFile)Writes the page contents to the pdf buffer.-
Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
-
-
-
Constructor Detail
-
PDFPage
public PDFPage(PDFFile pFile)
Creates a PDF page for the page tree and pfile.
-
-
Method Detail
-
getContents
public PDFPageBuffer getContents()
Returns the page contents buffer.
-
setMediaBox
public void setMediaBox(RMRect aRect)
Sets the media box for the page.
-
setCropBox
public void setCropBox(RMRect aRect)
Sets the crop box for the page.
-
getAnnotation
public PDFAnnotation getAnnotation(int anIndex)
Returns the specific page annotation at the given index.
-
addAnnotation
public void addAnnotation(PDFAnnotation annot)
Adds an annotation to the page.
-
getResourceMap
public java.util.Map getResourceMap(java.lang.String resourceName)
Returns the named resource dict for this page.
-
getExtGStateMap
public java.util.Map getExtGStateMap()
Returns the ExtGState dict for this page.
-
addExtGState
public void addExtGState(java.lang.String aName, java.util.Map aMap)Adds a named graphics state parameter dict to the ExtGState dict for this page.
-
addColorspace
public 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
-
addPattern
public java.lang.String addPattern(java.lang.Object pattern)
Adds a new pattern to the resource dict and returns the name by which it's referred
-
resolvePageReferences
public void resolvePageReferences(PDFPagesTree pages)
Resolves page references for page annotations.
-
closeContents
public void closeContents()
Caches compressed contents into _stream and releases contents for efficiency.
-
writePDF
public void writePDF(PDFFile pdfFile)
Writes the page contents to the pdf buffer.
-
-