JasperReports字体 [英] JasperReports fonts

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

问题描述

我需要以PDF格式导出日文报告。报告字体必须是Tahoma。所以我将报告字体设置为Tahoma。最初它像JVM不可用的tahoma抛出,我已经将tahoma.ttf作为jar放在classpath中。之后,当我执行时,对于Tahoma,它不支持,pdf encode =UniJIS-UCS2-HW-H选项。

I need to export the Japanese report in PDF. Report font must be Tahoma. So I set the report font as "Tahoma". Initially it thrown like "tahoma" not available to JVM, I have placed the tahoma.ttf as jar in classpath. After that, When I execute, For Tahoma, it doesn't support, pdf encode= "UniJIS-UCS2-HW-H" option.

错误如下:
使用支持的编码:UniJIS-UCS2-HW-H

Error is like: Usupported encoding: "UniJIS-UCS2-HW-H"

使用的PDF字体是HeiseiKakuGo-W5

PDF font used is "HeiseiKakuGo-W5"

有人可以建议一个解决方案吗?

Can anyone suggest a solution please?

推荐答案

不要使用pdfEncoding或isPdfEmbedded。这些属性在几年前就已被弃用。使用字体扩展。引入它们是为了解决这个问题。它们会让您在尝试时生成PDF。如果你谷歌jasperreports字体扩展名,你应该找到你需要的信息。

Do not use pdfEncoding or isPdfEmbedded. These attributes were deprecated years ago. Use Font Extensions. They were introduced to solve exactly this problem. They'll let you generate the PDF as you are attempting to do. If you Google "jasperreports font extensions" you should find the information that you need.

这篇关于JasperReports字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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