You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Bruno Polder <br...@epunkt.com> on 2001/11/05 16:14:19 UTC
Problem with images
Hi,
i want to use batik, to convert SVG's to PDF. I've built a test-svg to see if it works.
Everytime i try to convert the svg, i get th following BridgeException:
org.apache.batik.bridge.BridgeException: file:/e:/testsvg/test1.svg:0
The attribute 'xlink:href' of the element <image> is required
at org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(SVGImageElementBridge.java:83)
.
.
.
.
My svg looks like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" "svg-styleable.dtd" []>
<svg height="190" viewBox="0 0 280 190" width="280" xml:space="preserve">
<image xlink:href="10972.jpg" height="190" id="10972" width="380" x="0" y="0"/>
<image xlink:href="10973.png" height="90" id="10973" width="158" x="50" y="50"/>
<text x="100" y="100" style="font-size:40">testText</text>
<text x="150" y="150" style="fill:red;font-size:30">testText1</text>
</svg>
Does anybody know why i get that exception? I can convert other svgs.
thanks
bruno
Re: Problem with images
Posted by Vincent Hardy <vi...@sun.com>.
Bruno,
I think that either the xlink:href attribute is missing on the <image>
element or that you omited the SVG DOCTYPE declaration at the top
of your SVG file.
I hope this helps.
Vincent.
Bruno Polder wrote:
>
> Hi,
>
> i want to use batik, to convert SVG's to PDF. I've built a test-svg to see if it works.
> Everytime i try to convert the svg, i get th following BridgeException:
>
> org.apache.batik.bridge.BridgeException: file:/e:/testsvg/test1.svg:0
> The attribute 'xlink:href' of the element <image> is required
> at org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(SVGImageElementBridge.java:83)
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org