Hello,

I use the PDFTranscoder to create a PDF document from SVG, but
the quality of the result is bad.
I tried it with the pdftranscoder.jar from Batik 1.5/1.5.1 and with
the fop.jar (FOP 0.20.5) and the results were different.

pdftranscoder:
-the colors are a little different
-the text has no anti-aliasing
-the opacity seems to be okay

fop:
-the colors are okay
-the opacity does not work
-the text has anti-aliasing


How can I create a pdf document wich looks like the original SVG? The created JPG, PNG and TIFF documents are correct.

public static void transcodeSVG2PDF(byte[] svgInput,
                                    OutputStream output,
                                    Color backgroundColor)
                           throws TranscoderException, IOException {
 TranscoderOutput transcoderOutput = new TranscoderOutput(output);
 PDFTranscoder transcoder = new PDFTranscoder();
 transcoder.addTranscodingHint(ImageTranscoder.KEY_BACKGROUND_COLOR,
                               backgroundColor);
 transcoder.transcode(new TranscoderInput(
                                 new ByteArrayInputStream(svgInput)),
                      transcoderOutput);
 output.flush();
}


Thanks! Mathias Kalb

--
ProDatO Integration Technology GmbH
Hauptstrasse 60, 91054 Erlangen
http://www.prodato.de

Mathias Kalb, Dipl.-Inf. (FH)
mailto:[EMAIL PROTECTED]
fon: +49-9131-612877
fax: +49-9131-612881


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to