Rolf, See if the paths are good. When initialising the TranscoderInput, is it pointing to the good svg file?
Another suggestion: use the OutputStream constructor of TranscoderOutput instead of the one using Writer. Felicia Rolf Schumacher wrote: > As I got no answer I'd like to explain that the code is straight forward. > > // setting up the svg file - this works as it should > > > Writer svg = new OutputStreamWriter( > > new FileOutputStream(new File(output)),"UTF-8"); > > svgGenerator.stream(svg, true); svg.flush(); svg.close(); > > // at this point the svg drawing is available > // setting up the transcoder for jpeg translation > > > > > JPEGTranscoder t = new JPEGTranscoder(); > > t.addTranscodingHint( > > JPEGTranscoder.KEY_QUALITY, new Float(.8)); > > // directing transcoder input to the just generated svg drawing > > > > > TranscoderInput tin = new TranscoderInput( > > new File(output).toURL().toString()); > > // setting up the transcoder output to an arbitrary file > > > > > Writer jout = new OutputStreamWriter( > > new FileOutputStream(new File(jpegOutput))); > > TranscoderOutput tout = new TranscoderOutput(jout); > > // do the translation from svg to jpeg > > > > > t.transcode(tin, tout); jout.flush(); jout.close(); > > // the problem here is that the output is empty but > // according to the example it should contain the same drawing with jpeg > pixels > > Has anybody tried that? Has to work that way? > > Rolf > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- ------------------------------------------------------------ Felicia IONASCU Oc� Print Logic Technologies mailto:[EMAIL PROTECTED] 1, rue Jean Lemoine phone : +33 (0)1 48 98 81 99 94015 Cr�teil cedex, France fax: +33 (0)1 48 98 54 50 http://www.oce.com/ ------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
