This commit is contained in:
@@ -619,8 +619,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
viewPDF(blobData, reportName) {
|
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 fileName = (reportName && `${reportName}.pdf`) || "myreport.pdf";
|
||||||
const newBlob = new Blob([blobData], { type: "application/pdf" });
|
const newBlob = new Blob([blobData], { type: "application/pdf" });
|
||||||
const newWindow = window.open("", reportName, "width=800,height=1200");
|
const newWindow = window.open("", reportName, "width=800,height=1200");
|
||||||
|
|||||||
Reference in New Issue
Block a user