Skip to content
This repository has been archived by the owner on Feb 28, 2019. It is now read-only.

Export SVG charts using html2canvas + jsPDF + jspdf.customfonts.js #43

Open
upadsha opened this issue Jun 6, 2018 · 0 comments
Open

Comments

@upadsha
Copy link

upadsha commented Jun 6, 2018

Hi i need to export a SVG chart with custom fonts using 3 components, i am a able to do with html2canvas and jsPDF but custom fonts not exporting in jsPDF hence using your jspdf.customfonts.js but it is throwing error, and not applying custom fonts. i used your run book steps but in vain.

Please advise
ERROR:
jspdf.debug.js:160 jsPDF PubSub Error No unicode cmap for font Error: No unicode cmap for font
at t.registerTTF (jspdf.customfonts.min.js:9)
at new t (jspdf.customfonts.min.js:9)
at Function.t.open (jspdf.customfonts.min.js:9)
at Object. (jspdf.customfonts.min.js:9)
at PubSub.publish (jspdf.debug.js:157)
at addFont (jspdf.debug.js:647)
at Object.API.addFont (jspdf.debug.js:2374)
at Object.onrendered (realtimectrl.js:425)
at jspdf.debug.js:15229

jspdf.debug.js:160 jsPDF PubSub Error Cannot read property 'advance' of undefined TypeError: Cannot read property 'advance' of undefined
at jspdf.customfonts.min.js:9
at Array.map ()
at o (jspdf.customfonts.min.js:9)
at t.embedTTF (jspdf.customfonts.min.js:9)
at Object.e.putFont (jspdf.customfonts.min.js:9)
at PubSub.publish (jspdf.debug.js:157)
at putFont (jspdf.debug.js:541)
at putFonts (jspdf.debug.js:564)
at putResources (jspdf.debug.js:588)
at buildDocument (jspdf.debug.js:1042)

jspdf.debug.js:160 jsPDF PubSub Error e.metadata.embedTTF is not a function TypeError: e.metadata.embedTTF is not a function
at Object.e.putFont (jspdf.customfonts.min.js:9)
at PubSub.publish (jspdf.debug.js:157)
at putFont (jspdf.debug.js:541)
at putFonts (jspdf.debug.js:564)
at putResources (jspdf.debug.js:588)
at buildDocument (jspdf.debug.js:1042)
at getArrayBuffer (jspdf.debug.js:1106)
at getBlob (jspdf.debug.js:1116)
at Object. (jspdf.debug.js:1145)
at Object.__safeCallWrapper [as output] (jspdf.debug.js:679)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant