Product: Web-Viewer
Product Version: 8.10.0
Please give a brief summary of your issue:
I need to add programmatically the same signature on multiple signature fields
Product: Web-Viewer
Product Version: 8.10.0
Please give a brief summary of your issue:
I need to add programmatically the same signature on multiple signature fields
Hi Ulises,
You can use the SignatureWidgetAnnotation.sign API to sign multiple signature widgets. Together with annotationManager.getAnnotationCopy
you can use the same annotation to sign all the widgets.
Ex:
const signatureAnnot = annotationManager.getAnnotationsList().filter(annot => annot instanceof Annotations.StampAnnotation || annot instanceof Annotations.FreeHandAnnotation)[0];
annotationManager.getAnnotationsList()
.filter(annot => annot instanceof Annotations.SignatureWidgetAnnotation)
.forEach(annot => {
const annotCopy = annotationManager.getAnnotationCopy(signatureAnnot);
annotationManager.addAnnotation(annotCopy);
annot.sign(annotCopy);
});
Replace signature annotation with the FreeHand/StampAnnotation from your code.
Best Regards,
Ahmad Moaaz
Software Developer
PDFTron Systems, Inc.
www.pdftron.com
hi @Ahmad,
how can I use .sign
function on Android and iOS