Directly saving as PDF - Node
lokacoding opened this issue · comments
LokaCoding commented
Hi this code works in Node 18 to generate the datauri string.
var pdfCreated = jsPDFInvoiceTemplate.default({
...invoiceObject,
outputType: OutputType.DataUriString,
returnJsPDFDocObject: true,
fileName: "Invoice 2024",
orientationLandscape: false,
compress: true
});
console.log(pdfCreated.dataUriString);
How to save this directly as pdf? I think there is a function but I dont get it.
Thanks!
Edison Neza commented
Hi,
try the other outputTypes. If none of them works, try to see how to create a file in nodejs using blob.