fschutt / printpdf

An easy-to-use library for writing PDF in Rust
https://docs.rs/printpdf/
MIT License
802 stars 96 forks source link

svg: improve bbox handling of generated PDF #110

Closed cyphar closed 2 years ago

cyphar commented 2 years ago

Some SVGs have fractional pixel bounding boxes, which we can safely round up without the user noticing anything. In addition, previously this code would use the width (x2) as both the height and width of the bounding-box -- this is also rectified.

Signed-off-by: Aleksa Sarai cyphar@cyphar.com

cyphar commented 2 years ago

@fschutt Your re-apply of #107 basically reverted this patch entirely. I will re-submit it.