java生成128b条码,在Java中将条形码128设置为B类型

本文介绍如何在Java中生成CODE128B类型的条形码。通过设置 Barcode128 类的 CodeType 为 Barcode.CODE128_RAW,并结合特定的编码函数StringEncode128,成功生成包含校验位的128B条形码图像。代码示例中展示了生成条形码并保存为GIF文件的过程。
摘要由CSDN通过智能技术生成

I am using this code to generate barcode128 :

String stb1 = "123456789";

code128.setCode(stb1);

//code128.setCodeType(Barcode128.CODE128_UCC);

//code128.setCode("1234567890");

code128.setStartStopText(true);

Image image128 = code128.createImageWithBarcode(cbd, null, Color.white);

image128.setAbsolutePosition(20 + x, 626 + y);

image128.scaleAbsolute(109, 33);

document.add(image128);

My client want the barcode 128 type B. How to set it to type B? I tried CODE128_UCC, CODE128_RAW, CODE128 in setCodyType() but three of them looks similar.

解决方案

thanks to the previous answer by pmoleri, I succeded in using Itext (Itextsharp version 5.3.3.0) for generating a barcode128 Type B. This is the c# code I wrote, hope it might help:

String stb1 = "123456789";

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值