Hi all,
I'm trying to make a linear gradient using SVG inside XSL-FO. I am using
FOP version 0.20.5.
I've only used SVG to make simple shapes like rectangles, occasional
vertical text and I can
output solid colors fine but when I try to use gradient color then it just
outputs all black.
If I put the SVG code as a separate SVG file and view it (with adobe SVG
viewer for example)
then it comes out just fine. I've tried embedding the SVG code and also
tried bringing it in as
an external file (like .jpg) but both do the same thing (output black). So
I'm wondering what I might be doing wrong, if FOP will even do this, or if
there is another FO processor that can do the job (hopefully freeware :) ).
I'm including the snippet that I'm trying to get to work.
<fo:block>
<fo:instream-foreign-object>
<svg xmlns="http://www.w3.org/2000/svg" width="50mm"
height="25mm">
<defs>
<linearGradient id="three_stops">
<stop offset="0%" style="stop-color: #ffcc00;" />
<stop offset="33.3%" style="stop-color: #cc6699;" />
<stop offset="100%" style="stop-color: #66cc99;" />
</linearGradient>
</defs>
<rect x="20" y="20" width="200" height="100"
style="fill:url(#three_stops); stroke: black;" />
</svg>
</fo:instream-foreign-object>
</fo:block>
Thanks for any feedback/help.
_________________________________________________________________
Rethink your business approach for the new year with the helpful tips here.
http://special.msn.com/bcentral/prep04.armx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list