Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created August 11, 2020 10:51
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/adc606e9b70625168acf6c659c05b41f to your computer and use it in GitHub Desktop.
Save bjoerntx/adc606e9b70625168acf6c659c05b41f to your computer and use it in GitHub Desktop.
var signatureSettings = {
signerName: "Tim Typer",
signerInitials: "TT",
uniqueId: "12345-ABCDE",
redirectUrlAfterSignature: null,
ownerName: "Document Requestor",
signatureBoxName: "txsign",
showSignatureBar: true }
function readDocument(input) {
input = input.srcElement;
if (input.files && input.files[0]) {
var fileReader = new FileReader();
fileReader.onload = function (e) {
TXDocumentViewer.loadDocument(
e.target.result.split(',')[1],
input.files[0].name,
signatureSettings);
};
// read the file and convert it to Base64
fileReader.readAsDataURL(input.files[0]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment