Reputation: 23
I have been exploring pdftron for my website on my trial version,but I could not find any specific examples for customising the signature tool,Any help appreciated.
Upvotes: 0
Views: 815
Reputation: 663
This guide provides information about the signature tool and some of the APIs available https://www.pdftron.com/documentation/web/guides/advanced/signature
For example here's a code snippet from the guide about how to customize the sign here element.
var createSignHereElement = Annotations.SignatureWidgetAnnotation.prototype.createSignHereElement;
Annotations.SignatureWidgetAnnotation.prototype.createSignHereElement = function() {
// signHereElement is the default one with dark blue background
var signHereElement = createSignHereElement.apply(this, arguments);
signHereElement.style.background = 'red';
return signHereElement;
}
If you want to do more complicated customizations to the UI, the WebViewer UI components are all open source and able to be modified. Here is a link to the SignatureModal component that can get you started https://github.com/PDFTron/webviewer-ui/tree/master/src/components/SignatureModal
This guide discusses how to edit and run the UI https://www.pdftron.com/documentation/web/guides/ui/advanced-customization
Upvotes: -1