From d4178fed3f2178b1f0c296bf1834ae7e3e61d4e1 Mon Sep 17 00:00:00 2001 From: F-Node-Karlsruhe Date: Fri, 6 Jan 2023 14:19:11 +0100 Subject: [PATCH] download pdf instead of show --- frontend/src/views/Verify.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/Verify.vue b/frontend/src/views/Verify.vue index 46dbf7f..0f0814d 100644 --- a/frontend/src/views/Verify.vue +++ b/frontend/src/views/Verify.vue @@ -173,11 +173,11 @@ export default { }, methods: { downloadCredentialPDF(credential) { - var win = window.open('', '_blank'); + //var win = window.open('', '_blank'); credentialPDF(credential) .then((pdf) => { - return pdfMake.createPdf(pdf).open({}, win); - //return pdfMake.createPdf(pdf).download(this.getCredCompId('credential', credential.id) + '.pdf'); + //return pdfMake.createPdf(pdf).open({}, win); + return pdfMake.createPdf(pdf).download(this.getCredCompId('credential', credential.id) + '.pdf'); }) .catch((error) => { this.toast.error(`Something went wrong creating the pdf!\n${error}`);