Jspdf: I set addFileToVFS. However, it does not work.

Created on 8 Nov 2018  ยท  3Comments  ยท  Source: MrRio/jsPDF

Thank you for submitting an issue to jsPDF. Please read carefully.

Are you using the latest version of jsPDF?

1.4.1
Have you tried using jspdf.debug.js?
Yes
Steps to reproduce
`var doc = new jsPDF();

//malgun is base64string
doc.addFileToVFS('malgun.ttf', malgun);
doc.addFont('malgun.ttf', 'malgun', 'normal');
doc.setFont('malgun');

//tCol is Column
//tRow is Row
//maybe tCol, tRow is include Hangul(Korea Language).
doc.autoTable(tCol, tRow, {
theme: 'grid',
styles: {
font: 'malgun',
fontStyle: 'normal'
},
headerStyles: {
font: 'malgun'
}
});
doc.save('export.pdf');
`
What I saw
strange language in autotable cell( only Hangul. )
[https://imgur.com/a/b9WH2ZL] <--error Image URL Link
[https://imgur.com/a/O6vskTL] <-- I want Image URL Link
What I expected

  • I wonder how to use custom font.
  • How to set contentType 'uft-8'
  • Did you do anything wrong with the 'Steps to Reprodece' I described?

All 3 comments

Please provide a zip file with a sample project.

zip ํŒŒ์ผ์— ์ƒ˜ํ”Œ ํ”„๋กœ์ ํŠธ๋ฅผ ์ œ๊ณตํ•˜์‹ญ์‹œ์˜ค.

oh, i'm Sorry.
i solved Problem.

@mellisa0109 I am also facing the same issue,
can you please provide the details how you resolved it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

glaier picture glaier  ยท  3Comments

tarekis picture tarekis  ยท  4Comments

allenksun picture allenksun  ยท  3Comments

andmaltes picture andmaltes  ยท  4Comments

NoFootDancer picture NoFootDancer  ยท  3Comments