xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sriram Nookala" <sri...@proteusmobile.com>
Subject Exception transcoding from SVG to JPEG
Date Tue, 06 Aug 2002 15:50:32 GMT
I get the following exception on Linux and Solaris running on Tomcat 4.01b1.
I don't get any errors on Windows though.:

2002-08-06 11:21:19,344 [HttpProcessor[9040][2]] DEBUG
(com.proteusmobile.campai
gnapp.web.analyze.DrawChart:doGet:?) -
org.apache.batik.transcoder.TranscoderExc
eption: null
Enclosed Exception:
SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found



The code snippet is as follows:

 if (svgXML != null) {
      JPEGTranscoder t = new JPEGTranscoder();
      t.addTranscodingHint(JPEGTranscoder.KEY_QUALITY,
                           new Float(.8));
      OutputStream out = response.getOutputStream();

      TranscoderInput input = new TranscoderInput( new
StringReader(form.getSvgXML()) );

      try {
        //OutputStream ostream = new FileOutputStream("test2.jpg");
        TranscoderOutput output =
          new TranscoderOutput(out);
        t.transcode(input, output);
        //ostream.flush();
        //ostream.close();
        out.flush();
        out.close();
      }
      catch (Exception e)
      {
        fLog.debug("Error transcoding");
        fLog.debug(e);
      }
    }



---------------------------------------------------------------------
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