Hi Gregory,

Gregory wrote:

I have an svg document with the following element:
<image x="0" y="0" width="612" height="792"
 xlink:href="http://xml.apache.org/batik/images/splash.png"/>

It works fine with the rasterizer and with squiggle.
But if I try the Transcoder API with something like
this:

TranscoderOutput out = new
TranscoderOutput(outputStream);
// doc is SVGDocument
TranscoderInput in = new TranscoderInput(doc);
transcoder.transcode(in, out);

   So I'm fairly sure that the problem is that
Batik doesn't know the URL base to use to resolve
xlink:href's in 'doc'.  There are two ways to solve this.
First you can use the xml:base attribute to provide a
base URL for resolution.  Second you can use TranscoderInput.setURI
to provide a uri to go with your doc.

I get:

java.lang.NullPointerException
at org.apache.batik.bridge.DocumentLoader.getLineNumber(Unknown

   This looks like a bug from 1.5.1 where it would get an NPE
when looking up the line number so it could generate a useful
error message.  What version of Batik are you using?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to