typst / svg2pdf

Converts SVG files to PDF.
Apache License 2.0
273 stars 32 forks source link

Fix issue with viewbox not being applied properly #38

Closed LaurenzV closed 1 year ago

LaurenzV commented 1 year ago

Fixes the following issue. The problem was that we applied the viewbox transform in the Matrix attribute instead of directly in the content stream, and as a consequence on this, anything outside the coordinates (0, 0, page_width, page_height) would be invisible, regardless of what the viewbox of the SVG was. This PR fixes this. Some test images needed to be updated, but those were only a few pixel differences.

laurmaedje commented 1 year ago

Thank you!