I'd like to trigger a javascript function when my document is loaded in DocuVieware. I tried my usual jquery when document is loaded. But that's not really working in this case. I want to do a PostCustomServerAction when my document is loaded and load existing annotations and a few other things. I am using Asp.Net MVC and razor.
I initiate the DocuVieware from my Razor page with:
Code: Select all
docuVieware.LoadFromStream(new MemoryStream(Convert.FromBase64String(ViewBag.FileAsBase64)), true);
docuVieware.RenderControl(new HtmlTextWriter(this.Output));
Code: Select all
<script type="text/javascript">
function OnLoadDocumentSuccess() {
DocuViewareAPI.PostCustomServerAction("DocuVieware1", true, "setDefaultValues");
}
</script>