Package com.orsonpdf
Class Page
java.lang.Object
com.orsonpdf.PDFObject
com.orsonpdf.Page
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 Summary
Modifier and TypeMethodDescriptionReturns a new rectangle containing the bounds for this page (as supplied to the constructor).Returns thePDFObjectthat represents the page content.Returns thePDFGraphics2Dinstance for drawing to the page.byte[]Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.Methods inherited from class com.orsonpdf.PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
Method Details
-
getBounds
Returns a new rectangle containing the bounds for this page (as supplied to the constructor).- Returns:
- The page bounds.
-
getContents
Returns thePDFObjectthat represents the page content.- Returns:
- The
PDFObjectthat represents the page content.
-
getGraphics2D
Returns thePDFGraphics2Dinstance for drawing to the page.- Returns:
- The
PDFGraphics2Dinstance for drawing to the page.
-
getObjectBytes
public byte[] getObjectBytes()Description copied from class:PDFObjectReturns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.- Specified by:
getObjectBytesin classPDFObject- Returns:
- A byte array.
-