-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Hi, I don't use NodeJS so I use the prebuild version of PDFKit to generate the PDF.
I imported the library in the HTML file
`<script src="Scripts/blob-stream.js" type="text/javascript"></script>
It worked well with built-in fonts.
When I registered a font from a file and used it
doc.registerFont('OpenSans-Regular', 'fonts/OpenSans-Regular.ttf', 'OpenSans-Regular'); doc.font('OpenSans-Regular');
I got this error
Uncaught ReferenceError: fs is not defined at Object.fontkit.openSync (pdfkit.js:16213) at Function.PDFFont.open (pdfkit.js:12888) at PDFDocument.font (pdfkit.js:14673)
Can anyone please guide me how to solve this problem?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels