I've tried to change the encoding but this doesnt work.
Now i create a temp file from the svg and instead of providing an
StringReader
new TranscoderInput(new
StringReader(svgMsg));
i provide the URI for the file
new TranscoderInput(file.toURI.toString());
This works fine. Any ideas why this is the case?
Robert Lummert schrieb:
> Hello Mark,
>
> I use umlauts myself and have no problem transcoding to pdf with very
> much the same code as yours. Which xml-encoding do you use in the svg?
> I use
> <?xml version="1.0" encoding="ISO-8859-15"?>
> and simply write out the umlauts in the svg.
> The result is correct in svg as well as in transcoded pdf.
>
> Cheers,
>
> Robert
>
>
> Mork Ork wrote:
>
>> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]