dompdf/php-svg-lib

Paths in SVG without a fill specified are not visible

usb248 opened this issue · 5 comments

Hi,

The owner of dompdf (which use your lib) suppose that your new release is broken : link

Can you tell me more ?

It's interesting for me too

Hi,

Same here.
With Dompdf 0.8.1 and 0.8.2 using version 0.3.* stopped working

Any fix... project is died

For the next who will seek, here's workaround dompdf/dompdf#1612 (comment)

Many thanks to @vielhuber.

Copy of the comment with the solution (just in case)

For anybody struggling with this:

Replace

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 79.02 55.93">

with

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 79.02 55.93" fill="#000000">

and everything works!

Here is a command line batch script that does that for you:

find . -type f -name "*.svg" -print0 | xargs -0 sed -i '' -e 's/<svg xmlns/<svg fill="#000000" xmlns/g'

Hi. did you have a solution? I have the same problem.