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

[xsl] XSL-FO: Including SVG images


Subject: [xsl] XSL-FO: Including SVG images
From: Antonio Fiol <fiol@xxxxxxxxxx>
Date: Fri, 05 Jul 2002 09:56:37 +0200


Hello,



I am using FOP, and I tried the following code to include a dynamically generated SVG image


<xsl:variable name="url">http://......svg...</xsl:variable>
<fo:block>
<fo:instream-foreign-object>
   <xsl:copy-of select="document($url)" />
</fo:instream-foreign-object>
</fo:block>

I thought that this was the "right way" of doing it, but...

What I get is a (square?) *portion* of my original SVG, with some texts and other objects missing (maybe those that would be cut by the right edge?). It looks odd...

With simple SVG code (not dynamically generated, and included directly in the XSL file), such as:

<fo:instream-foreign-object>
 <svg:svg width="400px" height="300px">
   <svg:desc>Graphique des performances de l'URL.
   </svg:desc>
   <svg:image x="0" y="0" width="400px" height="300px"
              xlink:href="http://host/some/image.png">
     <svg:title>My image</svg:title>
   </svg:image>
 </svg:svg>
</fo:instream-foreign-object>

it works great, unless the width and height in the svg element do not match those on the image element, in which case, my image is cropped, as expected.

However, I am not a SVG expert, and I do not fully understand the image I am including. I would like to learn SVG and solve the problem myself, sincerely, but that would take me way too long. (Yes, a lame excuse, I know.)

Does anyone see what my problem is without needing the SVG file?

Or is anyone willing that I send an example generated image to him/her for deeper study?

I know you are all very busy, but any help vould be greatly appreciated.

Thank you very much.


Antonio Fiol



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




Current Thread
Keywords