本文共 2858 字,大约阅读时间需要 9 分钟。
A leading Java barcode generator to be used in J2EE, J2SE environment and Java Reporting (JasperReports and Eclipse BIRT).
Barcode for Java supports generating high quality barcode images inBarcode 所支持的条形码类型(太多我就不一一讲了,大家点进官网看吧)
| |
|
由于我使用条形码,不是为了机器去读,只是为了好看,看上去报表更专业。
在这么多的条形码类型中,我个人认为code11 不但好用,样子也不错。
这里贴点使用和介绍(太简单,我也懒的翻译了)
The following code illustrates how to create a barcode in a Java class
1 Linear linear = new Linear(); 2 linear.setData("123456789"); 3 linear.setType(Linear.CODE11); 4 linear.renderBarcode("c:/code11.gif");
There are two ways to create barcode images in your Java web applications.
1 Linear linear = new Linear(); 2 linear.setData("123456789"); 3 linear.setType(Linear.CODE11); 4 linear.renderBarcode("C:/Tools/Tomcat 5.5/webapps/YourWebApp/bimages/barcode.gif");
The following jasper xml content illustrates how to insert a barcode into JasperReports
Import class BarcodeJasperFactory to report.
大家肯定下个包,搞个十几分钟就搞定一个条形码了
多产生几张你会发现恶心的事情出来了,由于barcode这个包不是免费的
不交钱就只能用体验版,体验版会随机在你的条形码中放入红色的barcodelib.com字样
由于产生的位置靠上,我就用一张白色的图片把上半部遮掉了, 虽然扁了点,但效果还不错
这样就可以免费使用相当于正式版的体验版。
最后如果大家如果有正式版的希望能发我个,省得我那么麻烦了
转载地址:http://qjbli.baihongyu.com/