iReport导出的pdf没有显示正确的字体 [英] iReport exported pdf does not show correct font

查看:641
本文介绍了iReport导出的pdf没有显示正确的字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用'Times New Roman'字体在iReport中生成的PDF似乎使用'Arial'作为其打印版本。

A PDF generated in iReport using the 'Times New Roman' font appears to be using 'Arial' for its print version.

知道问题是什么吗?

推荐答案

我发现,至少对我来说,我必须明确设置pdfEncoding属性,以及pdfFontName和isPdfEmbedded ,在xml中的每个字体标签上,即使使用系统编码,使用unicode时似乎也需要Identity-H。

I've found that, at least for me, I must explicitly set the pdfEncoding attribute, as well as pdfFontName and isPdfEmbedded, on each font tag in the xml, even when using the system encoding, and that "Identity-H" seems to be needed when using unicode.

所以:


  1. 确保您的ttf字体文件在类路径中可用

  2. < font ... pdfFontName = filename.ttf

  3.     isPdfEmbedded =true

  4.     pdfEncoding =Identity-H ... />

  1. Make sure your ttf font files are available on the classpath
  2. <font ... pdfFontName="filename.ttf"
  3.    isPdfEmbedded="true"
  4.    pdfEncoding="Identity-H" ... />

这篇关于iReport导出的pdf没有显示正确的字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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