dompdf / php-svg-lib

SVG file parsing / rendering library
GNU Lesser General Public License v3.0
1.4k stars 77 forks source link

Paths in SVG without a fill specified are not visible #24

Closed usb248 closed 2 years ago

usb248 commented 6 years ago

Hi,

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

Can you tell me more ?

landsman commented 6 years ago

It's interesting for me too

pfbernardo commented 6 years ago

Hi,

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

usb248 commented 6 years ago

Any fix... project is died

devbranch-nikita commented 5 years ago

For the next who will seek, here's workaround https://github.com/dompdf/dompdf/issues/1612#issuecomment-499258250

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'
siamshaeed commented 3 years ago

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