I am using PDFMake, library to generate PDF from my ionic/angular application. The PDF generation is working perfectly fine. However issue is that -
- After pdf generation process is completed, I go back to dashboard page
- And from dashboard page I go to Another page (any page, same pdf generation page or any other page), I get following error.
I have following codes:
import pdfMake from 'pdfmake/build/pdfmake';
import pdfFonts from 'pdfmake/build/vfs_fonts';
pdfMake.vfs = pdfFonts.pdfMake.vfs;
//---------------------
//---------------------
ionViewWillLeave(){
if(this.pdfObj) this.pdfObj = null;
}
generatePdf(){
let docDefinition = {
pageSize: "A3",
content: [
..............
],
}
this.pdfObj = pdfMake.createPdf(docDefinition);
this.pdfObj.download();
}
------------------------------------
Any help will be highly appreciated.
Thanks

