alafr / SVG-to-PDFKit

Insert SVG into a PDF document created with PDFKit
MIT License
397 stars 111 forks source link

`transform-origin` is not respected #156

Open adamwong246 opened 2 years ago

adamwong246 commented 2 years ago
<svg width="100" height="100" viewBox="0 0 100 100">
  <rect width="100%" height="100%" fill="gold"/>
  <rect width="100%" height="100%" transform-origin="50% 50%" transform="scale(0.3)" fill="green"/>
</svg>

Rendered correctly: https://codepen.io/adamwong246/pen/QWOvxRP

Screen Shot 2022-02-14 at 3 28 19 PM

Rendered incorrectly: https://alafr.github.io/SVG-to-PDFKit/examples/demo.htm

Screen Shot 2022-02-14 at 3 27 03 PM