This commit is contained in:
2020-09-02 22:58:36 +00:00
parent d4a6401eb2
commit 8c9efe9366

View File

@@ -619,8 +619,12 @@ export default {
}
},
viewPDF(blobData, reportName) {
// Adapted from: https://blog.jayway.com/2017/07/13/open-pdf-downloaded-api-javascript/
// https://gist.github.com/bondgeek/d44657b2a65e45cb3a645454845fe500
//possibly useful links:
//https://blog.jayway.com/2017/07/13/open-pdf-downloaded-api-javascript/
//https://gist.github.com/devloco/5f779216c988438777b76e7db113d05c
//https://github.com/eligrey/FileSaver.js
const fileName = (reportName && `${reportName}.pdf`) || "myreport.pdf";
const newBlob = new Blob([blobData], { type: "application/pdf" });
const newWindow = window.open("", reportName, "width=800,height=1200");