3

PDFKit works fine for me, but when I render symbols like ₹ and č, it doesn't show up at all (not even as character garbage).

I'm not converting a web page, I'm manually creating a PDF. Do I have to set a charset? If so, how?

And I know the fonts have the characters — I'm using the same font on the web with no problems (Open Sans).

Edit: The PDFKit live demo can't seem to handle these characters either.

delwin
  • 830
  • 2
  • 10
  • 15
  • 1
    Have you looked at [this](http://stackoverflow.com/questions/18718559/how-to-output-euro-symbol-in-pdfkit-for-nodejs)? – PeterVC May 01 '14 at 14:03
  • Yes, and I put an issue on GitHub. It appears the issue is that the font does not have the characters, and the browsers are automatically inserting them. – delwin May 01 '14 at 17:18

1 Answers1

0

Have look here How to output Euro symbol in pdfkit

But there, make a copy of the font in your project and then use the following line of code to register the font in your pdfkit

doc.registerFont('Cardo', __dirname + '/../fonts/Cardo/Cardo-Regular.ttf');
H.A.
  • 350
  • 5
  • 14