On Wednesday 26 September 2001 10:02, Albert Valls wrote:
> I'm using the SVGTranscoder to save a SVG file. With one of the files works
> fine but with another gives this Exception when executing:
>
>    org.apache.batik.transcoder.TranscoderException: space
>         at
> org.apache.batik.transcoder.svg2svg.PrettyPrinter.fatalError(PrettyPrinter.
>java:1685) at
> org.apache.batik.transcoder.svg2svg.PrettyPrinter.printPI(PrettyPrinter.jav
>a:498) at
> org.apache.batik.transcoder.svg2svg.PrettyPrinter.printContent(PrettyPrinte
>r.java:937) at
> org.apache.batik.transcoder.svg2svg.PrettyPrinter.printElement(PrettyPrinte
>r.java:899) at
> org.apache.batik.transcoder.svg2svg.PrettyPrinter.print(PrettyPrinter.java:
>242) at
> org.apache.batik.transcoder.svg2svg.SVGTranscoder.prettyPrint(SVGTranscoder
>.java:222) at
> org.apache.batik.transcoder.svg2svg.SVGTranscoder.transcode(SVGTranscoder.j
>ava:178) at SVGDOMUtils.saveToSVG(SVGDOMUtils.java:338)
>
> What space is referring to ?? Which is the problem ??
>
> The code:
>
>    FileOutputStream outputS = new FileOutputStream(path);
>    Writer outS= new OutputStreamWriter(outputS, "UTF-8");
>    TranscoderInput inputS = new TranscoderInput(doc);
>    TranscoderOutput outputS2 = new TranscoderOutput(outS);
>    SVGTranscoder t = new SVGTranscoder();
>    //t.addTranscodingHint(SVGTranscoder.KEY_DOCTYPE,false );
>    t.transcode(inputS, outputS2);    // this is the line 338

Your code is correct. There was bug in the pretty-printer, related with the 
processing instructions. It should be fixed in the next release of batik.

Thanks,
  Stephane.

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

Reply via email to