fschutt / printpdf

A fully-featured PDF library for Rust, WASM-ready
https://fschutt.github.io/printpdf/
MIT License
829 stars 98 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.