Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors in SVG which are specified by name do not work #877

Open
OndrejUzovic opened this issue May 3, 2024 · 1 comment
Open

Colors in SVG which are specified by name do not work #877

OndrejUzovic opened this issue May 3, 2024 · 1 comment

Comments

@OndrejUzovic
Copy link

When an svg which has specified the color by a name is inserted into the pdf document, the color is rendered black.

Here is a short svg example demonstrating the problem:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
   <rect x="10" y="10" height="100" width="100" style="stroke:#ff0000; fill:MediumVioletRed"/>
</svg>

The pdf displays the rect filled with the back color instead of MediumVioletRed.

Please would it be possible to provide a fix?
Or do I miss something here?

@MahmudX
Copy link

MahmudX commented May 21, 2024

The color validator method expects the provided string to be a hex coded color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants