Class PDFPage

All Implemented Interfaces:
RMArchiver.Archiving, 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 Details

    • PDFPage

      public PDFPage(PDFFile pFile)
      Creates a PDF page for the page tree and pfile.
  • Method Details

    • 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 Map getResourceMap(String resourceName)
      Returns the named resource dict for this page.
    • getExtGStateMap

      public Map getExtGStateMap()
      Returns the ExtGState dict for this page.
    • addExtGState

      public void addExtGState(String aName, Map aMap)
      Adds a named graphics state parameter dict to the ExtGState dict for this page.
    • addColorspace

      public String addColorspace(Object cspace)
      Adds a new colorspace to the resource dict and returns the name by which it's referred
    • addPattern

      public String addPattern(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.