I want to create a field in which a signature can be inserted something like what is indicated in the documentation:
<script>
WebViewer({
path: 'lib/',
fullAPI: true,
initialDoc: 'example0006.pdf',
//config: 'config.js',
}, document.getElementById('viewer')).then(async instance => {
const { Annotations, annotManager, PDFNet, CoreControls, signatureWidgetAnnots, docViewer } = instance;
const createSignHereElement = Annotations.SignatureWidgetAnnotation.prototype.createSignHereElement;
Annotations.SignatureWidgetAnnotation.prototype.createSignHereElement = function() {
const signHereElement = createSignHereElement.apply(this, arguments);
signHereElement.style.background = 'red';
return signHereElement;
}
});
</script>
I have tried everything and it has not worked for me, please if anyone knows how it works I will appreciate it very much.