Measure Distance in a PDF on Android
Measure distance in a PDF using PSPDFKit for Android starting with version 8.4. To measure distance in your app, contact the Sales team to add the Measurement Tools component to your license, or run the SDK in trial mode.
Measure distance in one of the following ways:
Measuring Distance between Two Points
Measure the distance between two points in one of the following ways:
Measuring Distance between Two Points Using the Built-In UI
To measure the distance between two points using the built-in UI, follow these steps:
-
Touch and hold the annotation tools icon.
-
Tap Distance.
-
Draw a straight line between the two points you want to measure.
Measuring Distance between Two Points Programmatically
To measure the distance between two points programmatically, use the LineAnnotation
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 Distance between Multiple Connected Points
Measure the distance between multiple connected points in one of the following ways:
Measuring Distance between Multiple Connected Points Using the Built-In UI
To measure the distance between multiple connected points using the built-in UI, follow these steps:
-
Touch and hold the annotation tools icon.
-
Tap Perimeter.
-
Draw lines between the multiple points you want to measure.
Measuring Distance between Multiple Connected Points Programmatically
To measure the distance between multiple connected points programmatically, use the PolylineAnnotation
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.