如何在 Maven 上为 Jasper Reports 添加自定义字体

发布于 2024-12-17 22:05:28 字数 360 浏览 3 评论 0原文

我一直在尝试遵循此页面上的示例: http://grysz.com/2010/ 06/01/use-custom-fonts-in-jasperreports-pdf-exporter/ 尽管如此,当我在 Maven 上运行报告时,我发现我的字体在运行时不可用于 JVM,这是来自 tomcat 的错误。 任何人都有为 jasper 报告添加字体到 Maven 的经验,并且可以给我更好的指示来完成此任务吗?我已经尝试这个方法太久了,但它似乎无法正常工作。 谢谢,

帕特里克

I been trying to follow the example on this page:
http://grysz.com/2010/06/01/use-custom-fonts-in-jasperreports-pdf-exporter/
Still, when I ran the reports on maven, I get that my font is not available to the JVM at run-time as an error from tomcat.
Anyone has had experience adding fonts to Maven for a jasper report and can give me a little better instructions to accomplish this? I been trying this already for too long and it does not seem to work correctly.
Thanks,

Patrick

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心不设防 2024-12-24 22:05:28

使用 iReport,您可以导出字体作为扩展。
然后,您

  1. 可以将 font.jar 放入应用程序中并创建系统范围依赖项,
  2. 或者可以使用 Maven 将字体安装到存储库中。

顺便说一句:

您可以使用 jasperreports.properties 跳过这些错误消息。

# ignore missing fonts in reports
net.sf.jasperreports.awt.ignore.missing.font=true

Using iReport you can export fonts as an extension.
Then you

  1. can place your font.jar in your application and create an system-scope-dependency,
  2. or you can maven install your font into your repository.

By the way:

You can skip those error-messages using the jasperreports.properties.

# ignore missing fonts in reports
net.sf.jasperreports.awt.ignore.missing.font=true
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文