kojow7
kojow7

Reputation: 11424

SVG path with transparent fill becomes grey with TCPDF

I have a number of SVG images being inserted into a PDF file using TCPDF. For example:

<path d="M0 100 L 80 100 L 40 27 L 0 100" stroke="black" fill="transparent" stroke-width="5" />

The problem is that TCPDF seems to turn any transparency to grey. How can I make it transparent? I cannot simply turn it to white as it is being placed on top of other data as well.

Many of the shapes are complex, utilizing bezier curves and stroke arrays so I need to use a path rather than lines, polygons, or polylines.

Upvotes: 1

Views: 1093

Answers (1)

kojow7
kojow7

Reputation: 11424

I think this might not be possible, but I have found a workaround. Rather than setting

fill="transparent"

I just use:

fill="none"

or

fill-opacity="0"

This seems to work fine. Both can be found on this page:

How to make an SVG element transparent (using SVGweb)

Upvotes: 1

Related Questions