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

Problem with gradient in stroke #12664

Closed
SerDIDG opened this issue Nov 27, 2020 · 1 comment
Closed

Problem with gradient in stroke #12664

SerDIDG opened this issue Nov 27, 2020 · 1 comment

Comments

@SerDIDG
Copy link

SerDIDG commented Nov 27, 2020

Attach (recommended) or Link to PDF file here:
test.pdf

Configuration:

  • Firefox (84.0b4):
  • Windows 10 Pro (2004):
  • PDF.js version: latest

Steps to reproduce the problem:

  1. Open attached pdf file in pdf.js demo viewer.
  2. Circle is not affected by gradient and significantly wider.

What is the expected behavior? (Latest Chrome)
изображение

What went wrong? (Latest Firefox)
изображение

I used Adobe InDesign to export my project into pdf which contains svg layers. Here is a sample of svg i used for a demo above:

<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
    <defs>
        <linearGradient id="gradient" gradientUnits="userSpaceOnUse" x1="10" x2="90" y1="90" y2="10">
            <stop offset="0%" stop-color="#0a00b2"/>
            <stop offset="50%" stop-color="#ff0000"/>
            <stop offset="100%" stop-color="#fffc00"/>
        </linearGradient>
        <style>
            .circle {
                fill: none;
                stroke: url(#gradient);
                stroke-width: 2px;
            }
        </style>
    </defs>
    <circle class="circle" cx="50" cy="50" r="43"/>
</svg>
@janpe2
Copy link
Contributor

janpe2 commented Nov 30, 2020

Maybe a duplicate of #6769 and #10955.

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

3 participants