How can I determine the current active signature widget?

Product: PDF Viewer

Product Version: 11.12.0

How can I get the id of the current active signature widget? The reason I want to do this is because I have multiple sign in my pdf and I want to capture those images

I want to cache this image right after signature is created

Hi there,

If you want to capture the signature as they are created, you can use the signatureSaved event from the Signature Tool, i.e.

const signatureTool = instance.Core.documentViewer.getTool('AnnotationCreateSignature');

signatureTool.addEventListener('signatureSaved', (signature) => {
  // signature contains the signature object (image data, type, etc.)
  console.log('Signature saved:', signature);
});

Best regards,

Kevin