Create pdf with non-ASCII characters

1.9k Views Asked by At

When I write Hebrew text in PDFMake it becomes '????' in the output.
Is there a way to create a PDF containing non-ASCII characters?

1

There are 1 best solutions below

0
On

You should install a Font that support the Hebrew characters (same problem for all other languages with special characters.)

Here is how you should do : https://github.com/bpampuch/pdfmake/wiki/Custom-Fonts---client-side

  1. create vfs_fonts.js containing your fonts.
  2. define font family.
  3. change font family in doc-definition-object.

If not fixed after, please consider reporting the issue here : https://github.com/bpampuch/pdfmake/issues/165

It's seems to be the related issue to your problem and people seems to have this issue fixed there.