We are using PDFTron SDK in our reactjs Application and trying to create the signing app. We create the placeholder for signature and other user needs to sign on specified placeholder.
Currently user able to sign the document on clicking of placeholder (Sign here SignatureWidgetAnnotation) , but we want to user should not able to drag their signature outside specified placeholder (Sign here SignatureWidgetAnnotation).
You can do this by listening to the annotationChanged event and turning on the NoMove property on the newly created signature. Although the changed annotation is created through the event, you may not know whether the signature annotation was created for the widget or by itself through the event. So, I would recommend looping through the widgets and checking the annot property for the signature as that will be the associated signature for that widget.
The code I provided should work as it does not stop the widget from moving. It loops through the annotation list to find signature widgets and gets the associated signature annotation if it exists. Then it sets NoMove to true on it.
But I want to restrict them from drawing their signature outside the designated area. Users should only be able to sign within the specified placeholder and not anywhere else on the PDF.