Ahsan Murtaza
Ahsan Murtaza

Reputation: 73

How to detect clicks on a manually added signature/view in a PDF displayed using PDFView in Android?

I have an Android application where I'm displaying a PDF using PDFView library PdfViewer. I've successfully added a signature manually to the PDF programmatically. Now, I want to detect clicks on this signature area so that when a user clicks on it, I can trigger an action, such as showing a toast message. Since I'm not using link annotations and the signature is added programmatically, I need a method to detect clicks based on coordinates (x, y) within the PDFView.

Steps followed so far are:

  1. Successfully displayed PDF using PDFView library in Android PdfViewer
  2. Added a signature programmatically to the PDF using PDFBox library PdfBox-Android
  3. Attempted to detect clicks on the signature area by using coordinates (x, y) within the PDFView.

I want to detect the click on that signature pasted over the pdf document. or User may also clicks on PDFView and if that click is on above of my signature pasted. I can detect that too. So i can show a toast message.

Upvotes: 1

Views: 31

Answers (0)

Related Questions