alafr / SVG-to-PDFKit

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

Invisible line becomes visible #145

Open r4tz52 opened 3 years ago

r4tz52 commented 3 years ago

I'm trying to draw simple auto-generated SVG in PDF document. The SVG image has some lines with stroke="transparent" and stroke-width="0", but SVG-to-PDFKit internally adds fill="black" to them, so it become visible in output.

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
  <line stroke="transparent" opacity="1" stroke-width="0" x1="10" x2="190" y1="10" y2="190"/>
</svg>

pdf