mmd744
mmd744

Reputation: 59

How to add a language to JSPDF?

I'm using JsPDF and there's some problem with special characters. I'm creating a web-site pdf page where text is in Azerbaijani language (such letters as Ə,Ş are visualized). How can I fix this? Please help me

I've tried to use some custom fonts which must support those characters but the problems stays

doc.text(20, 40, "gəlirəm şabalıd");

output: glirm abalıd

Upvotes: 0

Views: 2741

Answers (1)

Alex
Alex

Reputation: 878

Try using a version of jsPDF >= 1.40 which supports UTF-8 characters. Which custom font are you using? I would suggest "Arial Unicode MS" or "Courier New", which can be found in system fonts.

As a final resort you could also try creating images with the problematic characters and replace the char with an image.

Upvotes: 1

Related Questions