Bug 41429 - DOMUtilities.writeDocument pretty printer enhancement
Summary: DOMUtilities.writeDocument pretty printer enhancement
Status: NEW
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: Utilities (show other bugs)
Version: 1.6
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: Batik Developer's Mailing list
Depends on:
Reported: 2007-01-21 22:46 UTC by Tonny
Modified: 2007-01-21 22:48 UTC (History)
0 users

DOMUtilities diff (1.28 KB, text/plain)
2007-01-21 22:48 UTC, Tonny

Note You need to log in before you can comment on or make changes to this bug.
Description Tonny 2007-01-21 22:46:32 UTC
DOMUtilities.writeDocument enhancement to provide pretty printer format. It is
just a method wrapper for SVGTranscoder.

In org.apache.batik.dom.util.DOMUtilities add the following 

import org.apache.batik.transcoder.Transcoder;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.TranscodingHints;
import org.apache.batik.transcoder.svg2svg.SVGTranscoder;

     * Writes the given document (in pretty printer format) using the given writer.
    public static void writeDocument(Document doc, Writer w, TranscodingHints
hints) throws IOException, TranscoderException {
        Transcoder transcoder = new SVGTranscoder();
        TranscoderInput in = new TranscoderInput(doc);
        TranscoderOutput out = new TranscoderOutput(w);
        transcoder.transcode(in, out);
Comment 1 Tonny 2007-01-21 22:48:02 UTC
Created attachment 19440 [details]
DOMUtilities diff

DOMUtilities diff