Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-688

DOMUtilities.writeDocument pretty printer enhancement

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Resolution: Unresolved
    • 1.6
    • None
    • Utilities
    • None
    • Operating System: All
      Platform: All

    Description

      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); }

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            tonny@kiyut.com Tonny

            Dates

              Created:
              Updated:

              Slack

                Issue deployment