Pentaho不会以UTF-8编码生成PDF [英] Pentaho don't Generete PDF in UTF-8 encoding

查看:130
本文介绍了Pentaho不会以UTF-8编码生成PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Pentaho BI平台中与PDF导出有关.我无法产生以UTF-8编码且包含西班牙语字符的正确PDF文件.该过程在本地报表设计器或BI服务器中均无法正常工作. PDF文件中会跳过诸如ñ"或ç"之类的特殊字符.其他格式的生成效果很好(HTML,Excel等).

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.

预先感谢

P.S.报表设计器和BI平台6.1.0.1版

P.S. Report Designer and BI platform version 6.1.0.1

推荐答案

似乎是字体问题.您的字体需要知道如何使用unicode,并且需要指定如何绘制"所需的字符.

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程序(至少是MS Office)会自动选择字体,该字体可以呈现任何字符(如果启用了字体替换),但是PDF阅读器不会这样做:它们始终使用您指定的确切字体.

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.

选择合适的字体时,必须注意受支持的Unicode字符和字体的许可证:某些字体不允许嵌入,如果编码为UTF-8,Pentaho会将使用过的字体的子集嵌入生成的PDF文件中或Identity-H.

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.

要为Linux服务器安装字体,您需要将字体文件复制到java/lib/fonts/文件夹或/usr/share/fonts/,向服务器用户授予读取权限,然后重新启动服务器应用程序.

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.

这篇关于Pentaho不会以UTF-8编码生成PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆