Class PdfPage

java.lang.Object
com.codename1.pdf.PdfPage

public final class PdfPage extends Object
One page of a PdfDocument, created by PdfDocument.addPage(PdfPageSize). Draw on it through getCanvas(); add clickable areas with addLink(float, float, float, float, String).
  • Method Details

    • getWidth

      public float getWidth()
      The width in points.
    • getHeight

      public float getHeight()
      The height in points.
    • getIndex

      public int getIndex()
      The zero-based position of this page in its document.
    • getCanvas

      public PdfCanvas getCanvas()
      The canvas that draws this page's content.
    • addLink

      public PdfPage addLink(float x, float y, float w, float h, String uri)
      Makes the rectangle (x, y, w, h) open uri when clicked.
    • addLink

      public PdfPage addLink(float x, float y, float w, float h, PdfPage target)
      Makes the rectangle (x, y, w, h) jump to the top of target, a page of the same document, when clicked.