开发者

FlyingSaucer (xhtmlrenderer): rendering € (euro) symbol in PDFs

I'm using the € symbol in some pdfs generated by flyingsaucer /itext. The euro symbol gets properly rendered in my machine, however when my app gets deployed on Linux the euro symbol is replaced by question marks.

I've been reading the docs, and it seems like I need to embed a font with the euro symbol (since the 开发者_Go百科so called Base 14 fonts don't have it), but I already tried this and it didn't work.

Any suggestions are welcome.


My colleague worked it out. I needed to convert my stream to the proper encoding:

String pageXHTMLConverted = new String(baos.toByteArray(), Charset.forName("ISO-8859-15"));

What's strange is that the step is not necessary on my machine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜