Hello,
I'm looking to allow the user to fill PDF forms via the pdf viewer - please refer to the attached sample shared that was provided to me on a seperate thread. I'm looking to provide the user a custom "Save" button (rather than using the Download button on the PDF Viewer), that will basically call the Download method on the server side that will save the filled document.
I'm using the below javascript to make the call on the button click:
function savePdf() {
var pdfviewerObj = $("#pdfviewer").data("ejPdfViewer");
pdfviewerObj.download();
alert("done");
}
Ideally, I would like to show the user a "Save Successful" message after the save is done on the server side. However, I'm observing that when I call the pdfViewerObj.download() method, it does not wait for the method to complete on the server-side, and immediately goes to the next line and shows "Done". This is not the behavior I was looking for, because I would like the download() call to wait for the server side method to execute successfully before going to the next line.
Is there any workaround to this? Or any other way so that I can show a "Success" message after the Download() method executes on the server side.
Thanks.
Attachment:
PdfViewer_MVCsample1139086068_b50f6eb7.zip