A PDF link annotation can execute arbitrary JavaScript code. This sample loads a PDF containing a link annotation with JavaScript code which, when clicked in DsPdfViewer, calls a DsPdfViewer-specific method showSignTool() that opens the Graphic Signature tool.
window.onload = function(){
const viewer = new DsPdfViewer("#viewer", {
workerSrc: "/document-solutions/javascript-pdf-viewer/demos/product-bundles/build/dspdfviewer.worker.js",
supportApi: getSupportApiSettings(),
restoreViewStateOnLoad: false
});
viewer.addDefaultPanels();
viewer.addAnnotationEditorPanel();
viewer.open("/document-solutions/javascript-pdf-viewer/demos/product-bundles/assets/pdf/viewer-link-execute-custom-js-action.pdf");
}