Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created September 12, 2022 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/a9bffec0fce49fc0b1bac9fa427008c7 to your computer and use it in GitHub Desktop.
Save bjoerntx/a9bffec0fce49fc0b1bac9fa427008c7 to your computer and use it in GitHub Desktop.
window.addEventListener("documentViewerLoaded", function () {
TXDocumentViewer.signatures.setSubmitCallback(signatureComplete);
});
function signatureComplete(e) {
var element = document.createElement('a');
element.setAttribute('href','data:application/pdf;;base64,' + e);
element.setAttribute('download', "results.pdf");
document.body.appendChild(element);
element.click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment