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