> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/android/measurement/measurement-a.md).

# Add PDF Measurement Tools in Android

Learn how to create and edit measurement annotations in PDFs using the DocumentActivity and PdfViewCtrlTabHostFragment2 components. Find out how to configure ToolManager and use different measurement

By default, creating and editing measurement annotations in the drop-in components [DocumentActivity](/android/open-save-document/open.md#show-a-document-in-an-activity) and [PdfViewCtrlTabHostFragment2](/android/open-save-document/open.md#display-document-in-fragment-on-android) are automatically enabled unless disabled using [`ToolManagerBuilder`](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/config/ToolManagerBuilder.html). You can learn more about configuring ToolManager [here](/android/annotation/toolmanager-config.md).

To create a measurement annotations, tap and hold on an area of the PDF without any text or annotations to bring up the long-press quick menu. Then find a group called `Measure` in the overflow menu.

There are three measurement tools:

* Distance: [RulerCreate](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/tools/RulerCreate.html)
* Perimeter: [PerimeterMeasureCreate](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/tools/PerimeterMeasureCreate.html)
* Area: [AreaMeasureCreate](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/tools/AreaMeasureCreate.html)

![](https://226546913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0QItsdFBmuuL9ezHimHy%2Fuploads%2Fgit-blob-907e3783ada20f7e654355097a03c7193bb70ac1%2F77c37d8737315a2f369d76eaf71e05e707337591-600x1191.gif?alt=media)

## Enable end point snapping

Snapping is useful when you want to precisely place annotations in documents by snapping them to lines & objects. The point snapping API can be used to easily place annotations to the exact location.

![](https://226546913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0QItsdFBmuuL9ezHimHy%2Fuploads%2Fgit-blob-18013b0426e6029312439bf72cca0d6f70d6ec22%2F7b385a49c62bd64bae4995fbaeb74323d1fe3516-422x818.gif?alt=media)

This is disabled by default and can be enabled as follows:

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
mToolManager.SetSnappingEnabledForMeasurementTools(true);
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
mToolManager.setSnappingEnabledForMeasurementTools(true);
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
mToolManager.isSnappingEnabledForMeasurementTools = true
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Calibration

The **Calibrate** menu option for measurement annotations allows you to determine a PDF's scale, enabling accurate measurements.

![](https://226546913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0QItsdFBmuuL9ezHimHy%2Fuploads%2Fgit-blob-5741166704fdc85117ca7c9af801c7e3632f5f0d%2Ff6f7e44402cda99a38b15944e6417c69b7782f84-600x1191.gif?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/android/measurement/measurement-a.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
