Custom barcode font?

别来无恙 提交于 2019-12-23 04:28:20

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/4303510/custom-barcode-font

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!