You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Kevin Flynn <ke...@birdstep.com> on 2002/10/23 12:36:15 UTC
problem with SVG files from OpenOffice
OpenOffice contains a handy drawing program that can export SVG files.
However, FOP will not handle simple drawings made with openoffice, even
though they display perfectly well in the Batik browser, Scribble.
After a little investigation, I found out that the problem has to do with
the co-ordinate space used in the SVG files made by openoffice.
OpenOffice SVG defines a co-ordinate space with a resolution of 0.01mm using
the root element's "viewBox" attribute, and then specifies all coordinates
as integers. For example:
<svg width="77mm" height="28mm" viewBox="0 0 7700 2800">
.
.
.
</svg>
This produces PDF output from FOP with a tiny dot in the top left corner of
the space reserved for the drawing.
If I modify the viewBox attribute to "0 0 77 28" and scale the contents by
0.01, as follows:
<svg width="77mm" height="28mm" viewBox="0 0 77 28">
<g transform="scale(0.01)">
.
.
.
</g>
</svg>
then the drawing is reproduced correctly by FOP.
Does anybody know anything about this or if there is any ready-made
workaround for it?
Best regards
--------------
Kevin Flynn
Birdstep Technology www.birdstep.com
Mobile: +47 93433942
Re: using variable
Posted by Oleg Tkachenko <ol...@multiconn.com>.
xavier gibouin wrote:
> <xsl:variable name="edition" select="@nom"/>
> <xsl:call-template name="[$edition]"/>
Why not using regular xslt templates?
<xsl:apply-template select="@nom"/>
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
using variable
Posted by xavier gibouin <xa...@axonie.com>.
HI
I have a probleme when i use varianle :
this my xml file :
<?xml version="1.0" encoding="ISO-8859-1"?>
<maquettes>
<maquette nom="CPAXXCAN1">
<variables>
<var nom="zplt">DOMITEL ASSURANCES</var>
<var nom="zplttel">0810 009 009</var>
...
</variables>
</maquette>
<maquette nom="CVAXXCAN1">
<variables>
<var nom="zctr">7B03680027</var>
<var nom="zplt">DOMITEL ASSURANCES</var>
...
</variables>
</maquette>
</maquettes>
and this my xsl file in which i try to call template :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/Graphics/SVG/SVG-19990812.dtd">
<xsl:import href="./CPAXXCAN1.xsl"/>
<xsl:import href="./CVAXXCAN1.xsl"/>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21.0cm" margin-top="0.0cm" margin-bottom="0.0cm" margin-left="0.0cm" margin-right="0.0cm">
<fo:region-body margin-top="0.0cm" margin-bottom="0.0cm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="PRINCIPAL">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-name="first" page-position="first"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-name="PRINCIPAL">
<fo:flow flow-name="xsl-region-body">
<xsl:for-each select="maquettes/maquette">
<xsl:variable name="edition" select="@nom"/>
<xsl:call-template name="[$edition]"/>
</xsl:for-each>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
and it doesn't work :
ERROR: Could not find template named: [$edition]
where I'l wrong
thanks
Xavier Gibouin
Axonie
Espace Mercoeur
8, rue Mercoeur
44000 Nantes
02.40.48.53.23
xavier.gibouin@axonie.comHi
Re: problem with SVG files from OpenOffice
Posted by Alex McLintock <al...@OWAL.co.uk>.
At 11:36 23/10/02, you wrote:
>OpenOffice SVG defines a co-ordinate space with a resolution of 0.01mm using
>the root element's "viewBox" attribute, and then specifies all coordinates
>as integers. For example:
I remember having to work around a FOP viewBox problem over a year ago and
don't know if it has been fixed.
I'm not sure if viewBox is implemented at all.
This may be one for the active FOP developers to answer.
(A search through the mailing list archives may help too)
Alex
Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here
http://www.OWAL.co.uk/oss_support/