neocotic / convert-svg

Node.js packages for converting SVG into other formats using headless Chromium
MIT License
198 stars 45 forks source link

convert-svg-to-png options do not override fixed SVG size #58

Open lietusme opened 5 years ago

lietusme commented 5 years ago

To ensure that SVG rendered correctly, I tried using w3 provided samples: https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/

But seems that fixed size SVGs do not resize, like this one: https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/Test.svg

convertFile() with options did produce specified dimensions PNG image, but SVG graphic was left in top-left corner in original size. Small dimensions just crops graphic.

This can be worked around by using non-fixed size SVGs, but is unexpected generally.