自定义条形码字体?

发布于 2024-10-05 04:00:07 字数 266 浏览 1 评论 0原文

使用iReport 2.0.2。

我有一个条形码字体,我想使用,但第一个问题是它不包含在 iReport 中。我尝试通过使用条形码字体作为常规字体来解决该问题,并且工作正常,但是当我将 PDF 发送到将 PDF 直接发送到打印机的组件 (pdfBox) 时,问题就会出现。即使该字体已嵌入并将条形码恢复为 Arial,该组件也无法识别该字体(这很长,而且不相关)。

我需要的是以某种方式将我的条形码字体嵌入到 iReport 中,以便它可以像任何其他现有条形码一样使用(并生成为图像)?

Using iReport 2.0.2.

I have a barcode font that I would like to use, but the first problem is that it isn't included in iReport. I tried to work around the problem by using the barcode font as a regular font and it works fine, but the problem appears when I send the PDF to a component (pdfBox) that sends the PDF directly to printer. The component can't recognize the font (it's long story and not relevant) even though it's embeded and reverts the barcode to Arial.

What I would need is to somehow embed my barcode font into iReport so it could be used just like any other existing barcode (and generated as an image)?

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

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

发布评论

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

评论(1

中性美 2024-10-12 04:00:07

看来问题出在 pdfBox 上。

要解决这个问题(并创建更稳定的解决方案),您可以使用 JasperReports 编译报告并生成 pdf(通过 java 代码),然后使用 Java 打印机库将其自动发送到默认打印机(或显示打印机选择对话框) 。

It looks like the problem is the pdfBox.

To work around it (and create a more stable solution) you can compile the report and generate the pdf with JasperReports (through java code) and then use Java printer library to send it automatically to the default printer (or display a printer selection dialogue).

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