Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created July 10, 2020 14:37
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/c4676008847adb064521bf3836a84ef9 to your computer and use it in GitHub Desktop.
Save bjoerntx/c4676008847adb064521bf3836a84ef9 to your computer and use it in GitHub Desktop.
async mergeDocument() {
// get the saved document from TXTextControl
let postDocument: MergedDocument = {
document: await saveDocument(),
};
// post the document to endpoint 'MergeDocument'
this._http.post<MergedDocument>(this._baseUrl +
'textcontrol/mergedocument', postDocument).subscribe(result => {
// load the results into TXDocumentViewer
loadDocumentViewer(result.document);
}, error => console.error(error));
}
function loadDocument(Document) {
TXDocumentViewer.loadDocument(Document.documentData, Document.documentName);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment