pdfkit-invoice icon indicating copy to clipboard operation
pdfkit-invoice copied to clipboard

UTF-8 support

Open mits87 opened this issue 3 years ago • 1 comments

Hi,

I'm trying to use your example to generate a PDF using pdfkit and everything looks really great but right now I have a problem with UTF-8 chars (for ex. żąśćółàç). Instead of correct charset I have a missing one.

Do you have any solution for that?

Best

mits87 avatar Jul 17 '21 15:07 mits87

@mits87 You can load a custom font to solve it, see here: https://pdfkit.org/docs/text.html For example, instead of using helvetica, I use Cardo: doc.font(path.join(__dirname, './assets/Cardo/Cardo-Regular.ttf'))

omerts avatar Oct 21 '21 20:10 omerts