Skip to content

Commit 67152ab

Browse files
authored
Added Code39
1 parent 2320a75 commit 67152ab

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

  • escposprinter/src/main/java/com/dantsu/escposprinter/barcode
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.dantsu.escposprinter.barcode;
2+
3+
import com.dantsu.escposprinter.EscPosPrinterSize;
4+
import com.dantsu.escposprinter.EscPosPrinterCommands;
5+
import com.dantsu.escposprinter.exceptions.EscPosBarcodeException;
6+
7+
public class Barcode39 extends Barcode {
8+
public Barcode39(EscPosPrinterSize printerSize, String code, float widthMM, float heightMM, int textPosition) throws EscPosBarcodeException {
9+
super(printerSize, EscPosPrinterCommands.BARCODE_TYPE_39, code, widthMM, heightMM, textPosition);
10+
}
11+
12+
@Override
13+
public int getCodeLength() {
14+
return this.code.length();
15+
}
16+
17+
@Override
18+
public int getColsCount() {
19+
return (this.getCodeLength() + 4) * 16;
20+
}
21+
}

0 commit comments

Comments
 (0)