Not able to set html2pdf().output('datauristring') response to global variable which is publicly define. I am using angular 8, i want to upload generated pdf on s3 by form data. i found your some stuff on GitHub for convert pdf to blob and from blob convert to file. but not able to access this datauri pdf string globally for file generation process.
this.blobString: any; html2pdf().from(element).set(options).toPdf().output('datauristring').then(function (res) { this.blobString = res; }); console.log(this.blobString);
Not able to set html2pdf().output('datauristring') response to global variable which is publicly define. I am using angular 8, i want to upload generated pdf on s3 by form data. i found your some stuff on GitHub for convert pdf to blob and from blob convert to file. but not able to access this datauri pdf string globally for file generation process.
this.blobString: any; html2pdf().from(element).set(options).toPdf().output('datauristring').then(function (res) { this.blobString = res; }); console.log(this.blobString);
console output: undefined
Please give a help..
This question raise on stack overflow also, please have a look. https://stackoverflow.com/questions/59200501/upload-html2pdf-generated-pdf-file-on-s3-bucket-by-form-data