Put a button to download a svg

Asked

Viewed 44 times

0

I’m tagged:

 <svg id="codBarras"></svg>

In it is created a barcode in SVG for me. I need to know if there is a way to download this image through a button. If there is, as I do in pure js?

  • Your SVG is inline within the <svg> tag? Or is it a type image <img src="codBarras.svg" alt=""> ?

  • It is generated by a framework that generates barcode, appears in the tag as soon as I type any value in the input

  • 1

    The Stackoverflow gringo has some answers about it. But I think this article also might interest you http://dinbror.dk/blog/how-to-download-an-inline-svg-as-jpg-or-png/

  • I could understand there not

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.