I have made UTF 8 work in jsPDF to be able to print any character in a PDF from Javascript.
Arab, Chinese, Turkish it all works.
Check my fiddle: http://jsfiddle.net/oscoweb/fqpgcap1/2/
The thing I am doing is:
- Write to canvas
- Make image from canvas
- Embed image in PDF
- Save PDF
This works... kinda... because it is ugly!
Therefor I need help in "1. Write to canvas". The text I am writing there is hardly readable and blurry.
context.fillStyle = "#000000";
context.font = "Arial 14px";
context.fillText("English", 1, 20);
context.fillText("Español", 1, 30);
context.fillText("Türk", 1, 40);
context.fillText("中國", 1, 50);
Any help on how to write text to Canvas and keep it readable would be greatly appreciated.