[cairo] SVG 2 PDF with rsvg-convert gradient and transparency problems

Adrian Jones ajones at umces.edu
Wed Feb 10 14:37:25 PST 2010

Sorry if I am posting to the wrong place, but I have just started playing
around with rsvg-convert and couldn't find anywhere else to ask for help.


When I open certain PDFs (converted from SVG via rsvg-convert) in
Illustrator I get this message:
"An unknown shading type was encountered" and the offending shapes are
un-editable "images" with a clipping mask over them.



There are two circumstances that result in problems for me.


1) A gradient with only 2 stops.


In the following example I have duplicated the offset="0" stop which fixes
things and means that if I convert the SVG to PDF with rsvg-convert the
resulting shape is filled with this gradient and works fine. Without the
duplicate declaration, the gradient is converted to an un-editable image
with a clipping mask.


Code: Select all

      <linearGradient id="ian_symbols_b8a58aafc1f12e74492e9e865b7f569b"
gradientUnits="userSpaceOnUse" x1="113.7275" y1="136.9414" x2="197.0259"

        <stop offset="0" style="stop-color:#927A62" id="stop1472" />

        <stop offset="0" style="stop-color:#927A62" id="stop1472_dup" />

        <stop offset="1" style="stop-color:#93866F" id="stop1474" />




2) A shape that has an opacity that is less than "1". I don't know how to
fix this one and still maintain the look of the original. I understand that
there are some issues with transparency and the PDF format, but obviously
the full AI version of the PDF format these days supports transparency.


So, could rsvg-convert handle these conversions better, or is there
something I can do with the original SVG code to make the opacity work ok in
the final PDF?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20100210/059e85ea/attachment.htm 

More information about the cairo mailing list