Hello,

i try to transform a SVG string into a PDF. But now where i have to use
german umlauts like Ä,Ö,Ü theres a problem:

My SVG is in UTF-8 and looks like this:

id="tspan6095">(2) Abladestelle - Lagerort -
Verwendungsschlüssel</tspan></text>

If i transcode it into PDF its not properly encoded, there are some
hieroglyph instead of the umlauts.

This is my code:

    public static String convert(String svgMsg, String labelId) {

        File pdf = new File(labelId + ".pdf");
        OutputStream outputStream;
        try {
            outputStream = new FileOutputStream(pdf);
            PDFTranscoder transcoder = new PDFTranscoder();
            TranscoderInput input = new TranscoderInput(new
StringReader(svgMsg));
            TranscoderOutput output = new TranscoderOutput(outputStream);
            transcoder.transcode(input, output);
            outputStream.flush();
            outputStream.close();

Can anyone tell me how to deal with the umlaut?

Thanks a lot

Reply via email to