![]() Our Javascript: var transferData = getFormAsJson() You can find our solution for the download here: Download PDF without refresh with IFrame. We have tried a lot but even if we had found a solution the extra effort for this tiny part of users would not have been worth the effort. For these we gave up a preview solution and simply send the document by clicking the preview button as a download to the user (instead of the preview). Now the problem children IE9 and IE10 remain. For this feature/bug see Chrome sends two requests when downloading a PDF (and cancels one of them). The required hidden-field pdfHelperTransferData (for sending our form data needed for PDF generation) is no longer set because the PDF is displayed in an IFrame. The reason why we didn't use this solution for Chrome is that although the PDF is displayed correctly, Chrome makes a new request to the server as soon as you click on "download" in the preview. The IFrame solution would of course also work for Chrome and co. ![]() Edge we use an IFrame and for all other browsers the object-tag. In Chrome/Firefox/Safari again no problem. This again didn't work for IE/Edge (maybe the same problem as with PDF.js). We therefore tried it with a Base64 string in an HTML object tag. However, it was unacceptably slow for our PDF. It worked with Base64 in the viewer for Firefox and Chrome. In addition, the entire page should not be reloaded when displaying a PDF as Preview in the Browser.įirst we tried PDF.jS. Our problem is that for legal reasons we are not allowed to temporarily store a PDF on the hard disk.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |