This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] SVG in Docbook XML to PDF gives strange results
- From: Alexander Karnstedt <alexander_berlin at gmx dot de>
- To: "Sanders, M." <MSA at ballastham dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Thu, 23 Oct 2003 16:30:31 +0200
- Subject: [docbook-apps] SVG in Docbook XML to PDF gives strange results
At 13:36 23.10.2003 +0200, Sanders, M. wrote:
I am trying to figure out how to include SVG in my docbook XML 4.2 documents.
When I use the example from Bob Stayton's XSL book with a file called
circle.svg:
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg">
<g style="fill-opacity:0.7; stroke:black; stroke-width:0.1cm;">
<circle cx="6cm" cy="2cm" r="100" style="fill:red;"
transform="translate(0,50)" />
<circle cx="6cm" cy="2cm" r="100" style="fill:blue;"
transform="translate(70,150)" />
<circle cx="6cm" cy="2cm" r="100" style="fill:green;"
transform="translate(-70,150)"/>
</g>
</svg>
All I get at the location of the image is the upper left quarter of a red
oval. I use fop-0.20.5, jimi-1.0.jar en the Java(TM) 2 Runtime
Environment, Standard Edition (build 1.4.2_01-b06) by Sun.
Anyone got an idea where my problem is?
I think the »svg« element needs some proper »width« and »height« attributes :
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" width="12cm" height="12cm">
<g style="fill-opacity:0.7; stroke:black; stroke-width:0.1cm;">
<circle cx="6cm" cy="2cm" r="100" style="fill:red;"
transform="translate(0,50)" />
<circle cx="6cm" cy="2cm" r="100" style="fill:blue;"
transform="translate(70,150)" />
<circle cx="6cm" cy="2cm" r="100" style="fill:green;"
transform="translate(-70,150)"/>
</g>
</svg>
or this way (wich is easier to rescale) :
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" width="6.8cm" height="6.0cm"
viewBox="-170 -50 340 300">
<g style="fill-opacity:0.7; stroke:black; stroke-width:0.1cm;">
<circle r="100" style="fill:red;" transform="translate(0,50)" />
<circle r="100" style="fill:blue;" transform="translate(70,150)" />
<circle r="100" style="fill:green;" transform="translate(-70,150)"/>
</g>
</svg>
Regards,
Alex
--
Alexander Karnstedt
alexander_berlin@gmx.de
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.