Package com.orsonpdf

Class Page


public class Page extends PDFObject
Represents a page in a PDFDocument. Our objective is to be able to write to the page using the PDFGraphics2D class (see the getGraphics2D() method).
  • Method Details

    • getBounds

      public Rectangle2D getBounds()
      Returns a new rectangle containing the bounds for this page (as supplied to the constructor).
      Returns:
      The page bounds.
    • getContents

      public PDFObject getContents()
      Returns the PDFObject that represents the page content.
      Returns:
      The PDFObject that represents the page content.
    • getGraphics2D

      public PDFGraphics2D getGraphics2D()
      Returns the PDFGraphics2D instance for drawing to the page.
      Returns:
      The PDFGraphics2D instance for drawing to the page.
    • getObjectBytes

      public byte[] getObjectBytes()
      Description copied from class: PDFObject
      Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.
      Specified by:
      getObjectBytes in class PDFObject
      Returns:
      A byte array.