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

Gradient not working on strokes #317

Open
kcap opened this issue Jan 16, 2025 · 1 comment
Open

Gradient not working on strokes #317

kcap opened this issue Jan 16, 2025 · 1 comment
Labels
difficulty:hard enhancement help wanted Help with creating a proper test-case, looking up the spec, or creating a pull request.

Comments

@kcap
Copy link

kcap commented Jan 16, 2025

Describe the bug
Strokes with gradient fill not working

To Reproduce
See example

https://raw.githack.com/yWorks/svg2pdf.js/master/index.html?svg=%253Csvg%2520version%253D%25221.1%2522%2520id%253D%2522Layer_1%2522%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520xmlns%253Axlink%253D%2522http%253A%252F%252Fwww.w3.org%252F1999%252Fxlink%2522%2520x%253D%25220px%2522%2520y%253D%25220px%2522%2520viewBox%253D%25220%25200%2520595.28%2520841.89%2522%2520style%253D%2522enable-background%253Anew%25200%25200%2520595.28%2520841.89%253B%2522%2520xml%253Aspace%253D%2522preserve%2522%253E%250A%2520%2520%253Cdefs%253E%250A%2520%2520%2520%2520%253ClinearGradient%2520id%253D%2522SVGID_1_%2522%2520gradientUnits%253D%2522userSpaceOnUse%2522%2520x1%253D%2522166.3525%2522%2520y1%253D%2522320.284%2522%2520x2%253D%2522414.959%2522%2520y2%253D%2522320.284%2522%253E%250A%2509%253Cstop%2520offset%253D%25220%2522%2520style%253D%2522stop-color%253A%2523FFF33B%2522%253E%253C%252Fstop%253E%250A%2509%253Cstop%2520offset%253D%25221%2522%2520style%253D%2522stop-color%253A%2523E93E3A%2522%253E%253C%252Fstop%253E%250A%253C%252FlinearGradient%253E%250A%2520%2520%253C%252Fdefs%253E%250A%253Cstyle%2520type%253D%2522text%252Fcss%2522%253E%250A%2509.st0%257Bfill%253A%252339B54A%253Bstroke%253Aurl%28%2523SVGID_1_%29%253Bstroke-width%253A15%253Bstroke-miterlimit%253A10%253B%257D%250A%253C%252Fstyle%253E%250A%250A%253Crect%2520x%253D%2522173.85%2522%2520y%253D%2522219.62%2522%2520class%253D%2522st0%2522%2520width%253D%2522233.61%2522%2520height%253D%2522201.32%2522%253E%253C%252Frect%253E%250A%253C%252Fsvg%253E%250A

@HackbrettXXX
Copy link
Member

Yes, gradients on strokes are not supported at the moment. We're happy to merge a PR. However, jsPDF also does not support this ATM.

I've updated #82.

@HackbrettXXX HackbrettXXX added enhancement help wanted Help with creating a proper test-case, looking up the spec, or creating a pull request. difficulty:hard labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:hard enhancement help wanted Help with creating a proper test-case, looking up the spec, or creating a pull request.
Projects
None yet
Development

No branches or pull requests

2 participants