exupero / saveSvgAsPng

Save SVGs as PNGs from the browser.
MIT License
1.09k stars 362 forks source link

Width option not working correctl #217

Open BartvanS opened 5 years ago

BartvanS commented 5 years ago

When i give my svg a width this happens: image

my code: saveSvgAsPng(document.getElementById(svgId), "Proefdruk.png", {width: '800px'});

the wanted result is more like this, but then with a width of 800px:

image

exupero commented 5 years ago

The width option sets the width XML attribute of the SVG node, which I believe simply crops the contents of the SVG and doesn't resize/stretch it.