


Regardless of the content of the PDF being a base64 or simply a text I would have to be able to open the same one, however I can not open any PDF file

Hello trying to create a file with PDF format. catch(error => console.log('Error openening file', error)) Ĭonsole.error('Unable to write file', error) then(() => console.log('File is opened')) Save the PDF to the data Directory of our App Help please, I have spend days on this! this.pdfObj = pdfMake.createPdf(docDefinition) Note: The cordova file plugin does not work with Capacitor ( Cordova plugins not working with Capacitor) so it seems I am stuck with Capacitor file system commands.Ĭan I write to blob in capacitor or is there a problem with my code? It seems to write ok but when I open the pdf it says the format is invalid. I am using Capacitor and the file system command does not appear to take a blob (this worked in cordova) so I am sending it a base64. I am generating a pdf using pdfMake and writing it to an android device so that I can open it.
