Measure Area in a PDF on Android

Measure area in a PDF using PSPDFKit for Android starting with version 8.4. To measure area in your app, contact the Sales team to add the Measurement Tools component to your license, or run the SDK in trial mode.

Measure area in one of the following ways:

Measuring the Area of a Polygon

Measure the area of a custom-drawn polygon in one of the following ways:

Measuring the Area of a Polygon Using the Built-In UI

To measure the area of a polygon using the built-in UI, follow these steps:

  1. Touch and hold the annotation tools icon.

  1. Tap Polygon Area.

  2. Draw a polygon around the area you want to measure.

Measuring the Area of a Polygon Programmatically

To measure the area of a polygon programmatically, use the PolygonAnnotation shape constructor, which takes a Scale object and a FloatPrecision object as its parameters. For more information on scale and precision, see the guide on configuring measurements.

Measuring the Area of an Ellipse

Measure the area of an ellipse in one of the following ways:

Measuring the Area of an Ellipse Using the Built-In UI

To measure the area of an ellipse using the built-in UI, follow these steps:

  1. Touch and hold the annotation tools icon.

  1. Tap Ellipse Area.

  2. Draw an ellipse around the area you want to measure.

Measuring the Area of an Ellipse Programmatically

To measure the area of an ellipse programmatically, use the CircleAnnotation shape constructor, which takes a Scale object and a FloatPrecision object as its parameters. For more information on scale and precision, see the guide on configuring measurements.

Measuring the Area of a Rectangle

Measure the area of a rectangle in one of the following ways:

Measuring the Area of a Rectangle Using the Built-In UI

To measure the area of a rectangle using the built-in UI, follow these steps:

  1. Touch and hold the annotation tools icon.

  1. Tap Rectangle Area.

  2. Draw a rectangle around the area you want to measure.

Measuring the Area of a Rectangle Programmatically

To measure the area of a rectangle programmatically, use the SquareAnnotation shape constructor, which takes a Scale object and a FloatPrecision object as its parameters. For more information on scale and precision, see the guide on configuring measurements.

Configuring Measurements

For more information on configuring measurements, see the guide on configuring measurements.