---
title: "How to get the location of an ink signature for digital signing"
canonical_url: "https://www.nutrient.io/guides/android/knowledge-base/getting-signature-location/"
md_url: "https://www.nutrient.io/guides/android/knowledge-base/getting-signature-location.md"
last_updated: "2026-06-26T03:15:47.233Z"
description: "If you want to digitally sign a document that doesn’t yet contain a SignatureFormField, you can add one at the location of an ink signature."
---

If you want to digitally sign a document that doesn’t yet contain a [`SignatureFormField`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.forms/-signature-form-field/index.html), you can add one at the location of an ink signature. To get the location of an ink signature, you have three options.

### Finding an already added ink signature

### JAVA

```java

@Override
public void onDocumentLoaded(@NonNull PdfDocument document) {
    // This will return the first ink signature found in the document.
    document.getAnnotationProvider().getAllAnnotationsOfType(EnumSet.of(AnnotationType.INK)).cast(InkAnnotation.class).filter(InkAnnotation::isSignature).firstElement().observeOn(AndroidSchedulers.mainThread()).subscribe(inkAnnotation -> {
            digitallySignAtLocation(inkAnnotation.getBoundingBox());
        });
}

```

### Finding an ink signature that was just added

### JAVA

```java

@Override
public void onDocumentLoaded(@NonNull PdfDocument document) {
    super.onDocumentLoaded(document);
    document.getAnnotationProvider().addOnAnnotationUpdatedListener(new AnnotationProvider.OnAnnotationUpdatedListener() {
        @Override
        public void onAnnotationCreated(@NonNull Annotation annotation) {
            if (annotation instanceof InkAnnotation &&
                ((InkAnnotation) annotation).isSignature()) {
                // This will be called when the user adds a new ink signature.
                digitallySignAtLocation(annotation.getBoundingBox());
            }
        }

        @Override
        public void onAnnotationUpdated(@NonNull Annotation annotation) {

        }

        @Override
        public void onAnnotationRemoved(@NonNull Annotation annotation) {

        }
    });
}

```

### Finding an ink signature that the user selected

### JAVA

```java

@Override
public void onDocumentLoaded(@NonNull PdfDocument document) {
    super.onDocumentLoaded(document);
    getPdfFragment().addOnAnnotationSelectedListener(new AnnotationManager.OnAnnotationSelectedListener() {
        @Override
        public boolean onPrepareAnnotationSelection(@NonNull AnnotationSelectionController controller,
                                                    @NonNull Annotation annotation,
                                                    boolean annotationCreated) {
            // You can return `false` to prevent the default annotation selection from happening.
            return true;
        }

        @Override
        public void onAnnotationSelected(@NonNull Annotation annotation, boolean annotationCreated) {
            if (annotation instanceof InkAnnotation &&
                ((InkAnnotation) annotation).isSignature()) {
                // This will be called when the user selects an ink signature.
                digitallySignAtLocation(annotation.getBoundingBox());
            }
        }
    });
}

```

See [here](https://www.nutrient.io/guides/android/features/digital-signatures.md#how-to-create-digital-signatures) for information on how to create digital signatures.
---

## Related pages

- [Allow Clear Text Traffic](/guides/android/knowledge-base/allow-clear-text-traffic.md)
- [Custom Print Functionality](/guides/android/knowledge-base/custom-print-functionality.md)
- [Deleting Pages From A Pdf](/guides/android/knowledge-base/deleting-pages-from-a-pdf.md)
- [Compose Qna](/guides/android/knowledge-base/compose-qna.md)
- [Easily disable share and print options in Android](/guides/android/knowledge-base/disable-share-documentinfo-print.md)
- [Disabling Annotation Rotation](/guides/android/knowledge-base/disabling-annotation-rotation.md)
- [Change page layout dynamically based on orientation](/guides/android/knowledge-base/dynamic-page-layout-when-changing-orientation.md)
- [Managing touch scrolling in Compose containers](/guides/android/knowledge-base/document-view-inside-pager-scroll-handling.md)
- [Getting All Digital Signatures](/guides/android/knowledge-base/getting-all-digital-signatures.md)
- [Intercepting Touch Events](/guides/android/knowledge-base/intercepting-touch-events.md)
- [Install Failed Insufficient Storage](/guides/android/knowledge-base/install-failed-insufficient-storage.md)
- [Invoking Share Action Programmatically](/guides/android/knowledge-base/invoking-share-action-programmatically.md)
- [Creating invisible digital signatures in Android](/guides/android/knowledge-base/invisible-signature.md)
- [Invoke Search Programmatically](/guides/android/knowledge-base/invoke-search-programmatically.md)
- [Override Hyperlink Behavior](/guides/android/knowledge-base/override-hyperlink-behavior.md)
- [Making Form Elements Read Only](/guides/android/knowledge-base/making-form-elements-read-only.md)
- [Runtime Permissions Cordova](/guides/android/knowledge-base/runtime-permissions-cordova.md)
- [Customize the overflow button color in Android](/guides/android/knowledge-base/styling-overflow-button.md)
- [Remove Tool Variant From Toolbar](/guides/android/knowledge-base/remove-tool-variant-from-toolbar.md)
- [Save signed PDFs directly to a remote server on Android](/guides/android/knowledge-base/save-signed-pdfs-to-remote-server.md)
- [Using Pspdfkit With Dynamic Feature Modules](/guides/android/knowledge-base/using-pspdfkit-with-dynamic-feature-modules.md)

