[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: gradient SVG inside XSL-FO using FOP outputting bl

Subject: Re: gradient SVG inside XSL-FO using FOP outputting black
From: Kobayashi <koba@xxxxxxxxxxxxx>
Date: Thu, 22 Jan 2004 10:43:29 +0900
svg in xsl fo
Hello !

XSL Formatter V3.0 supports SVG linear gradient.

I tried your sample, it works. 

Source fo file:
http://www.antennahouse.com/XSLsample/V3/text1.fo

Result PDF file:
http://www.antennahouse.com/XSLsample/V3/text1.pdf

Actually you need 'viewBox="0 0 240 140"' to display correct.

I hope it will be helpful for you.

Regards,


> Reply to the original mail from:
>  xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>

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




Tokushige Kobayashi
Antenna House, Inc.
E-mail koba@xxxxxxxxxxxxx
WWW    http://www.antenna.co.jp/XML/xml-top.htm
WWW    http://www.antennahouse.com/ (English)
TEL    +81-3-3234-1361(direct call)
FAX    +81-3-3221-9975

Antenna House XSL School
http://www.antenna.co.jp/XML/school/xslday.htm



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.