0
点赞
收藏
分享

微信扫一扫

itext 条码高度 条码宽度 条码参数 详细解释

Aliven888 2023-02-01 阅读 149


itext 条码高度 条码宽度 条码参数 详细解释_java

39的像素点如下

public static int getCode39Length(String code){
byte bars[] = Barcode39.getBarsCode39(code);
int barStartX = 0;
for (int k = 0; k < bars.length; ++k) {
float w = (bars[k] == 0 ? 1 : 1 * 2);
barStartX += w;
}
return barStartX;
}

128的像素点如下

public static int getCode128Length(String code){
String bCode = Barcode128.getRawText(code, false, Barcode128.Barcode128CodeSet.AUTO);
byte bars[] = Barcode128.getBarsCode128Raw(bCode);
int barStartX =0;
for (int k = 0; k < bars.length; ++k) {
float w = bars[k] ;
barStartX += w;
}
return barStartX;
}

Ean13的像素点 固定为95

UPCA(12)的像素点 固定为67

Ean8的像素点 固定为67


举报

相关推荐

0 条评论