Class PDFPage
java.lang.Object
com.inductiveautomation.rm.pdf.writer.PDFOutput
com.inductiveautomation.rm.pdf.writer.PDFBuffer
com.inductiveautomation.rm.pdf.writer.PDFPage
All drawing happens in PDFPage object. Contents is a stream to which all the marking functions get appended.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final byte
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAnnotation(PDFAnnotation annot) Adds an annotation to the page.addColorspace(Object cspace) Adds a new colorspace to the resource dict and returns the name by which it's referred.voidaddExtGState(String aName, Map aMap) Adds a named graphics state parameter dict to the ExtGState dict for this page.addPattern(Object aPattern) Adds a new pattern to the resource dict and returns the name by which it's referred.voidcloseContents(RMPDFWriter aWriter) Caches compressed contents into _stream and releases contents for efficiency.getAnnotation(int anIndex) Returns the specific page annotation at the given index.intReturns the number of annotations.Returns the ExtGState dict for this page.getResourceMap(String aResourceName) Returns the named resource dict for this page.voidgrestore()Restores the last graphics state of the writer.voidgsave()Saves the current graphics state of the writer.voidResolves page references for page annotations.voidsetCropBox(RMRect aRect) Sets the crop box for the page.voidsetFillColor(RMColor aColor) Sets the given color to be the current fill color.voidsetLineCap(int aLineCap) Sets the line cap: 0=butt, 1=round, 2=square.voidsetLineJoin(int aLineJoin) Sets the line join: 0=miter, 1=round, 2=bevel.voidsetMediaBox(RMRect aRect) Sets the media box for the page.voidsetOpacity(float anOpacity, byte coverage) Sets the opacity to be the following value, for stroke operations, fill operations or both.voidsetStrokeColor(RMColor aColor) Sets the given color to be the current stroke color.voidsetStrokeWidth(float aWidth) Sets the given line width to be the current line width.voidwritePDF(RMPDFWriter aWriter) Writes the page contents to the pdf buffer.Methods inherited from class com.inductiveautomation.rm.pdf.writer.PDFBufferappend, append, append, length, toByteArray
- 
Field Details- 
OPACITY_STROKE_ONLYpublic static final byte OPACITY_STROKE_ONLY- See Also:
 
- 
OPACITY_STROKE_AND_FILLpublic static final byte OPACITY_STROKE_AND_FILL- See Also:
 
- 
OPACITY_FILL_ONLYpublic static final byte OPACITY_FILL_ONLY- See Also:
 
- 
OPACITY_SHAPEpublic static final byte OPACITY_SHAPE- See Also:
 
 
- 
- 
Constructor Details- 
PDFPageCreates a PDF page for the page tree and pfile.
 
- 
- 
Method Details- 
setMediaBoxSets the media box for the page.
- 
setCropBoxSets the crop box for the page.
- 
setFillColorSets the given color to be the current fill color.
- 
setStrokeColorSets the given color to be the current stroke color.
- 
setStrokeWidthpublic void setStrokeWidth(float aWidth) Sets the given line width to be the current line width.
- 
setLineCappublic void setLineCap(int aLineCap) Sets the line cap: 0=butt, 1=round, 2=square.
- 
setLineJoinpublic void setLineJoin(int aLineJoin) Sets the line join: 0=miter, 1=round, 2=bevel.
- 
setOpacitypublic void setOpacity(float anOpacity, byte coverage) Sets the opacity to be the following value, for stroke operations, fill operations or both. Stupidly, there's no setOpacity or setRGBAColor op in PDF, so you have to modify the gstate parameter dict directly using the generic graphics state operator gs, which takes a name of a gstate map in page's ExtGState map (we have to add this silly little gstate map manually for each unique opacity).
- 
gsavepublic void gsave()Saves the current graphics state of the writer.
- 
grestorepublic void grestore()Restores the last graphics state of the writer.
- 
getAnnotationCountpublic int getAnnotationCount()Returns the number of annotations.
- 
getAnnotationReturns the specific page annotation at the given index.
- 
addAnnotationAdds an annotation to the page.
- 
getResourceMapReturns the named resource dict for this page.
- 
getExtGStateMapReturns the ExtGState dict for this page.
- 
addExtGStateAdds a named graphics state parameter dict to the ExtGState dict for this page.
- 
addColorspaceAdds a new colorspace to the resource dict and returns the name by which it's referred.
- 
addPatternAdds a new pattern to the resource dict and returns the name by which it's referred.
- 
resolvePageReferencesResolves page references for page annotations.
- 
closeContentsCaches compressed contents into _stream and releases contents for efficiency.
- 
writePDFWrites the page contents to the pdf buffer.
 
-