Last active
January 27, 2022 11:12
-
-
Save bjoerntx/911b664b06972b6d90e355a17ee4cd36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using TXTextControl.Web.MVC.DocumentViewer | |
<div style="width: 800px; height: 600px;"> | |
@Html.TXTextControl().DocumentViewer(settings => { | |
settings.Dock = DocumentViewerSettings.DockStyle.Fill; | |
settings.ToolbarDocked = true; | |
}).Render() | |
</div> | |
<input type="button" value="Merge Document" onclick="mergeDocument()" /> | |
@section Scripts { | |
<script type="text/javascript"> | |
function mergeDocument() { | |
// call the Web API "MergeDocument" | |
$.ajax({ | |
type: "GET", | |
url: "/Home/mergeDocument", | |
contentType: 'application/json', | |
success: successFunc, | |
error: errorFunc | |
}); | |
function successFunc(data, status) { | |
TXDocumentViewer.loadDocument(data); | |
} | |
function errorFunc(xhr, ajaxOptions, thrownError) { | |
alert(thrownError); | |
} | |
} | |
</script> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment