Class 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.
    • 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.