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

linearGradient not exported correctly if id begins with number #138

Closed
epuig-ssinergie opened this issue Mar 18, 2015 · 4 comments
Closed

Comments

@epuig-ssinergie
Copy link
Contributor

When saving SvgDocument to PNG, the gradient area is rendered as solid black.

After several tests, it seems to be directly related to the linearGradient which is beginning with a number, eg:
<linearGradient id="41cb5de8-82e7-4ab5-94d7-87e10775c848"

ko2

As a workaround i'm just adding a letter at the beginning of id and it works perfectly.

ok1

Thanks

@epuig-ssinergie
Copy link
Contributor Author

epuig-ssinergie commented Aug 24, 2017

same issue with radialGradient elements

@mrbean-bremen
Copy link
Member

According to W3C, an id name cannot start with a number, so this is not a valid SVG - not supporting this is not a bug.
Is there any standard application that generates this kind of ids? In this case, it may make sense to support this nonetheless.

@epuig-ssinergie
Copy link
Contributor Author

svg was generated using ASP.net Telerik library with getSVGString()
https://www.telerik.com/support/code-library/exporting-radhtmlchart-to-png-and-pdf

@mrbean-bremen
Copy link
Member

Ok, thanks - while this is basically a bug in the converter, it would make sense to handle this in that case.

H1Gdev added a commit to H1Gdev/SVG that referenced this issue May 21, 2019
…ins with number' issue.

- Do not check ID start character.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants