-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use PDFKit standard PDF fonts #1517
Comments
#1523 allows to use afm fonts which is used by pdfkit to support the 14 PDF Standard fonts It requires to store the afm font data without converting to buffer so the needed change I abstracted the loading and configuration in PdfAssetsLoader class from https://github.com/blikblum/pdfmake-utils A full example of how to setup Standard fonts can be found at: https://github.com/blikblum/pdfmake-playground/blob/master/src/setup/components.js#L9-L12 |
Standard 14 fonts are supported by pdfmake on server-side by default. How to use standard 14 fonts in pdfmake are described in wiki page. (reference #101) |
Ok, thanks. Another question - if i need support for another languages, i just convert ttf font to afm and replace afm from pdfkit? |
No, use ttf directly |
I tried using the example code but I'm getting errors: var PdfPrinter = require('pdfmake'); // generates error SCRIPT5022: Cannot find module 'pdfmake' Thank you for any assistance. Chris |
It is possible to use PDFKit standard fonts?
If we look at PDFKit example http://pdfkit.org/demo/browser.html
It is not required to load additional font to draw text with Times-Roman.
But looks like that pdfmake bundling not includes PDFKit files required for standard fonts support.
The text was updated successfully, but these errors were encountered: