alafr / SVG-to-PDFKit

Insert SVG into a PDF document created with PDFKit
MIT License
404 stars 115 forks source link

Clip-path and tranform issue #120

Closed Greeeeyyyss closed 4 years ago

Greeeeyyyss commented 4 years ago

Hi! I have an SVG that does not render correctly when generating to pdf. I found out the clip-path element is causing the issue. Other SVGs I tried with clip path are fine.

`<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 493.12 612">

`

Here's the what the SVG looks like originally and how it is rendered.

Screen Shot 2020-06-15 at 3 18 39 PM
alafr commented 4 years ago

Thanks for the report. The transform attribute was not used at all, it should be fixed now.