[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] gradient SVG inside XSL-FO using FOP outputting black


Subject: RE: [xsl] gradient SVG inside XSL-FO using FOP outputting black
From: Ryan Graham <Ryan.Graham@xxxxxxxxxxxxx>
Date: Wed, 21 Jan 2004 16:10:12 -0700

I experienced the same behavior when using 0.20.5.  It appears to be a known
bug:

http://xml.apache.org/fop/graphics.html#svg-problems

I never found a workaround.  

RenderX plans to implement support for <lineargradient> and <radialgradient>
in a future release of their processor, XEP, but the date is uncertain as
far as I can tell (see page 3 of 5 in the PDF):

http://xep.xattic.com/papers/svgpaper.pdf

HTH,
RG

>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
>yesult xochi
>Sent: Wednesday, January 21, 2004 3:19 PM
>To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
>Subject: [xsl] gradient SVG inside XSL-FO using FOP outputting black
>
>
>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
>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords
svg