xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thierry Kormann <tkorm...@ilog.fr>
Subject Re: SVGDocument to a SVG file
Date Thu, 13 Sep 2001 16:11:39 GMT
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: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message