W3C home > Mailing lists > Public > www-xsl-fo@w3.org > September 2002

svg image is to large and hence truncated when converted to pdf

From: jw2k1888 Wright2k1 <jw2k2@hotmail.com>
Date: Sat, 28 Sep 2002 14:32:34 +0000
To: www-xsl-fo@w3.org
Message-ID: <F3lF8HGmCvoXM7e0C9g00002060@hotmail.com>


Hi all,

I am currently using xsl/svg to transform an xml file into svg report 
graphs.  The result is an

svg image(file) that has 1 or more graphs stacked above one another 
depending upon the data in

the xml file. Like a vertical list of graphs.  I would like to export this 
xsl/svg output (svg

graphs) to pdf format but when I attempted this the pdf file comes out with 
only 1 page which

is the very top of the svg image?

Is there anyway of using xsl:fo so that if the svg image's height is like 
2000 pixels high the

pdf conversion would recognise that the first 600pixels would be page 1 and 
the next 600pixels

would be page 2 and so on?

simple analogy:

XML file:

<root>
</root>

XSL/SVG file:

<xsl:template name="2pageExample">
   <xsl:param name="counter" select="0"/>
   <xsl:param name="max" select="100"/>

   <svg:text x="50" style="fill:rgb(0,0,0)">
      <xsl:attribute name="y">
         <xsl:value-of select="$counter*20 + 50"/>
      </xsl:attribute>
      Blah
   </svg:text>

   <xsl:if test="$counter != $max">
     <xsl:call-template name="2pageExample">
       <xsl:with-param name="counter" select="$counter + 1"/>
       <xsl:with-param name="max" select="$max"/>
     </xsl:call-template>
   </xsl:if>
</xsl:template>

This would print out "Blah" text 101 times, creating a list of Blah text 
that spans over an

equivalent of 2 pdf pages.

Now when I apply

   <fo:block>
      <fo:instream-foreign-object>
           <svg:svg width="550" height="660">
                <xsl:call-template name="2pageExample"/>
            </svg:svg>
      </fo:instream-foreign-object>
   </fo:block>

I get one pdf page with the an incomplete list of blah text...

I've tried <fo:external-graphics> which produces a two page pdf file but 
page 1 is blank and

the list of Blah text starts on page 2 and then gets truncated.

I've tried placing it in <fo:tables> but it only works with normal text and 
not svg generated

text file.

Any sort of assistance or sugguestions would be greatly appreciated, Thanks.

Regards,

Jason.


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
Received on Saturday, 28 September 2002 10:33:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:09 GMT