Closed davejack1 closed 6 years ago
Any luck on this?
doc.addSVG?
Yeah, you right. But with hightcharts it was terrible. Funally I resolved it without jsPDF - just 30 strings in js with hightcharts library.
Actually I am working on the same issue :) I am using angular2-highcharts but imo highcharts svg are to complex for the doc.addSVG function so that does not work. How did you solve it?
@suuuunto , I created gist with comments: https://gist.github.com/aorzh/2df77ce9f43198387a87abe84de94dcd Enjoy :)
In my case, I try to get a png data uri to add this in a second step to the pdf.
I think I can not do this with your approach, right?
@suuuunto , how about some png to svg convertion? I foung this: https://github.com/ehtd/png2svg but didn't reviewed yet. Fill free to check. Maybe better swithch our discussion to https://gist.github.com/aorzh/2df77ce9f43198387a87abe84de94dcd ? Because I think this is not in jsPDF scope :-)
We will have in 1.4.1 addSvgAsImage-method added
It should be nice to have a minimal working example...
How can I add an SVG element to PDF that I dynamically created and assigned to a variable with javascript?