Open sarawutymtz opened 7 years ago
doc.fromHTML is not a function
doc.fromHTML does not work. Anyone can help? I include all js files under "plugins" folder. But nothing happen.
well. I added my custom font (russian). With only text it works fine, but with fromHtml i still got broken chars. http://joxi.ru/ZrJkEG4S15eXMm
my code was like
doc.addFileToVFS('Roboto-Regular.ttf', base); doc.addFont('Roboto-Regular.ttf', 'roboto', 'normal'); doc.setFont('roboto'); doc.fromHTML('<div id="editor" style="color:red;">русский текст</div> еще адын one', 15, 15, { 'width': 170 }); doc.text(15, 45, 'текст'); doc.save('custom_fonts.pdf');
+1
Have you solved your problem?
well. I added my custom font (russian). With only text it works fine, but with fromHtml i still got broken chars. http://joxi.ru/ZrJkEG4S15eXMm my code was like doc.addFileToVFS('Roboto-Regular.ttf', base); doc.addFont('Roboto-Regular.ttf', 'roboto', 'normal'); doc.setFont('roboto'); doc.fromHTML('
I have the same problem.
don't have function fromHTML ?
^_^