xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From VASQUEZ_JA...@LILLY.COM
Subject Re: Rasterizing via API
Date Mon, 29 Jan 2001 15:00:49 GMT
Thierry,

I should have included a snippet higher up in my source which did set the 
XMLParser hint (as is demonstrated in the command line rasterizer). 
(There's not really much to my source--it's just a variation on the 
writeImage method from the rasterizer app).

I consolidated the source a little bit, so here it is as it stands right 
now:  (I'll probably end up caching instances of the transcoder later once 
this is working)
<snip>
        private void writeImage(String svgInput, OutputStream ostream) 
throws IOException, TranscoderException {
                BufferedOutputStream bos = new 
BufferedOutputStream(ostream);
                BufferedReader br = new BufferedReader(new 
StringReader(svgInput));

                Transcoder t = new PNGTranscoder();
 t.addTranscodingHint(PNGTranscoder.KEY_XML_PARSER_CLASSNAME,
 "org.apache.crimson.parser.XMLReaderImpl");

                t.transcode(new TranscoderInput(br),
                            new TranscoderOutput(bos));
                bos.flush();
        br.close();
        }
</snip>

The method that is trying to be called at the point of the error is 
org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(String 
namespaceURI, String qualifiedName, DocumentType doctype). 
(SAXDocumentFactory is passing in a null for DocumentType)

Any ideas as to what might be going on?  I've attached some sample .svg 
that is contained in the String that I'm passing into this method.

Thanks,
Jason


Mime
View raw message