Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public final class PdfPage

  1. Object
  2. PdfPage
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).

Methods

public float getWidth()The width in points.
public float getHeight()The height in points.
public int getIndex()The zero-based position of this page in its document.
public PdfCanvas getCanvas()The canvas that draws this page’s content.
public PdfPage addLink(float x, float y, float w, float h, String uri)Makes the rectangle (x, y, w, h) open uri when clicked.
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.

Inherited methods

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.