Loading ...
Sorry, an error occurred while loading the content.

Using a SVG gradient in FO

Expand Messages
  • Casey Vincent
    I am currently working on FO that produces PDF output for our reports. To make them look a little better I want to add a little color. I have been trying to
    Message 1 of 2 , Nov 10, 2004
    • 0 Attachment
      I am currently working on FO that produces PDF output for our
      reports. To make them look a little better I want to add a little
      color. I have been trying to use SVG to create a gradient that goes
      across the top of the page. The SVG when viewed using the Adobe SVG
      view looks perfect. When I attempt to put it inside the FO it simply
      does not show the gradient. Antenna House supports this ability so
      the formatter should be able to handle it. Is there something
      slightly wrong with my SVG that Adobe is letting me get away with?
      Or has Antenna House not fully implemented gradients into their
      product?

      <fo:block text-align="center">
      <fo:instream-foreign-object border="solid black 1px" content-
      width="8.5in">
      <svg xml:space="preserve" viewBox="0 0 850 40">
      <g>
      <defs>
      <linearGradient id="topGrad"
      x1="0%" y1="0%" x2="100%" y2="100%"
      spreadMethod="pad">
      <stop offset="0%" stop-color="lightBlue"/>
      <stop offset="100%" stop-color="blue"/>
      </linearGradient>
      </defs>

      <rect x="0" y="0" width="850" height="40" style="fill: url
      (#topGrad); stroke: black;"/>
      <text x="425" y="25" style="font-family: sans-serif; font-
      size: 18pt; text-anchor: middle">Title</text>
      </g>

      </svg>
      </fo:instream-foreign-object>
      </fo:block>

      Thanks!


      -Casey Vincent
    • Tomoko Mayumi
      Hello, Antenna House XSL Formatter doesn t support linearGradient on GUI. However, it is supported in the PDF output. And, it will be supported on GUI in next
      Message 2 of 2 , Nov 11, 2004
      • 0 Attachment
        Hello,

        Antenna House XSL Formatter doesn't support linearGradient on GUI. However, it
        is supported in the PDF output. And, it will be supported on GUI in next release
        of V3.2.

        Thank you.
        //////////////////////////////////////////
        Tomoko Mayumi
        XSL Group
        Antenna House, Inc.
        http://www.antennahouse.com/


        "Casey Vincent" <Casey@...> wrote:

        >
        >
        > I am currently working on FO that produces PDF output for our
        > reports. To make them look a little better I want to add a little
        > color. I have been trying to use SVG to create a gradient that goes
        > across the top of the page. The SVG when viewed using the Adobe SVG
        > view looks perfect. When I attempt to put it inside the FO it simply
        > does not show the gradient. Antenna House supports this ability so
        > the formatter should be able to handle it. Is there something
        > slightly wrong with my SVG that Adobe is letting me get away with?
        > Or has Antenna House not fully implemented gradients into their
        > product?
        >
        > <fo:block text-align="center">
        > <fo:instream-foreign-object border="solid black 1px" content-
        > width="8.5in">
        > <svg xml:space="preserve" viewBox="0 0 850 40">
        > <g>
        > <defs>
        > <linearGradient id="topGrad"
        > x1="0%" y1="0%" x2="100%" y2="100%"
        > spreadMethod="pad">
        > <stop offset="0%" stop-color="lightBlue"/>
        > <stop offset="100%" stop-color="blue"/>
        > </linearGradient>
        > </defs>
        >
        > <rect x="0" y="0" width="850" height="40" style="fill: url
        > (#topGrad); stroke: black;"/>
        > <text x="425" y="25" style="font-family: sans-serif; font-
        > size: 18pt; text-anchor: middle">Title</text>
        > </g>
        >
        > </svg>
        > </fo:instream-foreign-object>
        > </fo:block>
        >
        > Thanks!
        >
        >
        > -Casey Vincent
        >
        >
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.