php-svg-lib icon indicating copy to clipboard operation
php-svg-lib copied to clipboard

Paths in SVG without a fill specified are not visible

Open usb248 opened this issue 8 years ago • 5 comments

Hi,

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

Can you tell me more ?

usb248 avatar Dec 08 '17 08:12 usb248

It's interesting for me too

landsman avatar Dec 11 '17 00:12 landsman

Hi,

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

pfbernardo avatar Jan 26 '18 16:01 pfbernardo

Any fix... project is died

usb248 avatar Feb 26 '18 11:02 usb248

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'

devbranch-nikita avatar Aug 22 '19 14:08 devbranch-nikita

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

siamshaeed avatar Feb 10 '21 07:02 siamshaeed