自定义条形码字体? [英] Custom barcode font?

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

问题描述

使用iReport 2.0.2。

Using iReport 2.0.2.

我想要使用条形码字体,但第一个问题是它不包含在iReport中。我试图通过使用条形码字体作为常规字体解决问题,它工作正常,但是当我将PDF发送到将PDF直接发送到打印机的组件(pdfBox)时出现问题。组件无法识别字体(它的长篇大论并且不相关),即使它被嵌入并将条形码还原为Arial。

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.

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

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)?

推荐答案

它看起来问题是pdfBox。

It looks like the problem is the pdfBox.

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

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).

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

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