CairoSVG
CairoSVG copied to clipboard
Strange artifacts when rendering patterns
When converting SVG artwork to PDF with cairosvg
, I noticed that strange artifacts appear in the rendering of <pattern>
s. FWIW, the artwork was created with Adobe Illustrator CC 2017.1.
Output when using cairosvg cover.svg -o cover.pdf
:
I noticed that reducing the --dpi
option to a value of 1
makes the output reasonably acceptable.
cairosvg cover.svg --dpi 1 -o cover.pdf
:
The PDF file size in bytes grows only by 20KB or so, but the dimensions of the PDF are affected (~100x larger crop/media boxes when using --dpi 1
vs when using the default).
Surprising to me:
- why does the rendering get better when the DPI value is lower?
- why are the crop/media box dimensions of the PDF affected when changing the DPI (since DPI is a resolution unit, not a scale unit)?
I've attached the original .svg file so you can take a look. In case this is a bug, feel free to use it as a test case for the project: cover.svg.zip
@liZe any ideas what the problem might be?
I'll try to find the source of the problem as soon as poosible!
@lize awesome thank you!