A reference error is thrown when attempting to save the pdf assembly without having filesaver.
constPDFAssembler=require('pdfassembler').PDFAssembler;asyncfunctionmain(){varpdf=newPDFAssembler("receipt.pdf");varstructure=awaitpdf.getPDFStructure();structure['/Root']['/Pages']['/Kids'][0]['/Contents']=[{'stream': "1 0 0 1 72 708 cm BT /Helv 12 Tf (Hello world!) Tj ET"}];// ReferenceError: File is not definedpdf.assemblePdf("output.pdf");}main();Possibly add it as a dependency?
Awesome lib though!
A reference error is thrown when attempting to save the pdf assembly without having filesaver.
Possibly add it as a dependency?
Awesome lib though!