You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2007/01/22 07:46:32 UTC

DO NOT REPLY [Bug 41429] New: - DOMUtilities.writeDocument pretty printer enhancement

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41429>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41429

           Summary: DOMUtilities.writeDocument pretty printer enhancement
           Product: Batik
           Version: 1.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Utilities
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: tonny@kiyut.com


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.setTranscodingHints(hints);
        transcoder.transcode(in, out);
    }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 41429] - DOMUtilities.writeDocument pretty printer enhancement

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41429>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41429





------- Additional Comments From tonny@kiyut.com  2007-01-21 22:48 -------
Created an attachment (id=19440)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19440&action=view)
DOMUtilities diff

DOMUtilities diff

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org