Skip to main content
1 of 2
Purushoth
  • 2.8k
  • 3
  • 24
  • 38

Try canvg for that to covert SVG to Canvas. Then convert the canvas to base64 string using .toDataURL().

More detailed answer is here http://stackoverflow.com/a/35788928/2090459

Check the demo here http://jsfiddle.net/Purushoth/hvs91vpq/

Canvg Repo: https://github.com/gabelerner/canvg

Purushoth
  • 2.8k
  • 3
  • 24
  • 38