On Thursday 13 September 2001 17:22, Albert Valls wrote:
> After modifying a SVGDocument I need to save the changes to a file. I
> suppose i have to use SVGGraphics2D but I'm not sure of this is the right
> way. Is there an easier way? Otherwise, how can I do it?

You have to use the SVGTranscoder which can take an SVGDocument and save it 
into a stream (a Writer to be correct).

org.apache.batik.transcoder.svg2svg.SVGTranscoder

other classes are part of the org.apache.batik.transcoder package.

A simple example that should work:

TranscoderInput input = new TranscoderInput(svgDocument);
TranscoderOutput output = new TranscoderOutput(writer);
Transcoder t = new SVGTranscoder();
t.transcode(input, output);


Hope that helps,
Thierry.


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

Reply via email to