I rendered two Svg images with the svg2pdf library.
Both are rectangles filled with gradients, but in different colors.
On the Pdf both gradients have the same color, dependent on which Svg gets rendered first.
The effect is reproducable on any number of Svg's, either they are all blue or all red.
By taking a closer look to the xml representation of the images, I detected that both gradients are using the same Id.
As far as I know these Id's should have different scopes so this effect should not appear.
Which is the case, when I display both pictures in the browser.
After exporting all rectangles are colored blue or red, depending on which one is the first.
I have attached both examples, so you can reproduce the error.
Hey guys,
I rendered two Svg images with the svg2pdf library. Both are rectangles filled with gradients, but in different colors.
On the Pdf both gradients have the same color, dependent on which Svg gets rendered first. The effect is reproducable on any number of Svg's, either they are all blue or all red.
By taking a closer look to the xml representation of the images, I detected that both gradients are using the same Id. As far as I know these Id's should have different scopes so this effect should not appear. Which is the case, when I display both pictures in the browser. After exporting all rectangles are colored blue or red, depending on which one is the first.
I have attached both examples, so you can reproduce the error.
Examples2.zip
I am using the newest versions of both jsPdf and svg2pdf
Thanks for your help Frederic