Pentaho don't Generete PDF in UTF-8 encoding

萝らか妹 提交于 2019-12-25 06:38:16

问题


I have a problem related with PDF exportation in Pentaho BI plattform. I'm not able to produce a correct PDF file encoded in UTF-8 and which contains Spanish characters. That procedure neither works properly in local Report Designer nor in BI server. Special characters like 'ñ' or 'ç' are skipped in the PDF file. Generation in other formats works just fine (HTML, Excel, etc.).

I've been struggling with that issue for few days being unable to find any solution and would be grateful for any clue.

Thanks in advance

P.S. Report Designer and BI platform version 6.1.0.1


回答1:


Seems like a font issue. Your font needs to know how to work with unicode and it needs to specify how to "draw" the characters you want.

Office programs (at least MS office) by default automatically select font, which can render any character (if font substitution is enabled), however PDF readers don't do it: they always use the exact font you've specified.

When selecting appropriate font, you have to pay attention to supported Unicode characters and to the font's license: some fonts don't allow embedding and Pentaho embeds font's subset, which was used, into generated PDF files if encoding is UTF-8 or Identity-H.

To install fonts for linux server you need to copy font files either to your java/lib/fonts/ folder or to /usr/share/fonts/, grant read rights to the server's user and restart the server application.



来源:https://stackoverflow.com/questions/38497425/pentaho-dont-generete-pdf-in-utf-8-encoding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!