How to distinguish between the Sign Here and the Initials button in a locationSelected event ? I have base64 image data for both signature and initials. Now upon clicking the Sign Here and Initials button appropriate signature/initials will be added in the pdf doc. I have used the below code section. If there is any other way of achieving this, please suggest.
PS: I don’t want to select Signature/Initials from signature tool overlay.
signatureTool.addEventListener('locationSelected', (data) => {
// if Sign here button clicked
signatureTool.setSignature(signatureBase64);
signatureTool.addSignature();
// if initials button clicked
signatureTool.setInitials(initialsBase64);
signatureTool.addInitials();
});
To identify between the “sign here” and “initials” button, you can use the SignatureWidgetAnnotation.requireInitials method. (Apryse WebViewer Class: SignatureWidgetAnnotation). This will return if the widget annotation is setup for initials or signatures.