Print CODE128 barcode Epson/IBM OKI thermal

523 Views Asked by At

printer : oki ml3320, emulation IBM I can't print this barcode...

Now I took 22. example from https://files.support.epson.com/pdf/general/escp2ref.pdf My last try looking that

final char[] x = {0x1B, 0x28, 0x42, 0x10, 0x00, 0x06, 0x02, 0x00, 0x7D, 0x00, 0x02, 0x42, 0x32, 0x33, 0x40, 0x61, 0x42, 0x63, 0x44, 0x5B, 0x5D};


    if (printer.getPrinterByName("OKI")){
        InputStream is = new ByteArrayInputStream(
                (new String(x)).getBytes(Charset.forName(DOSCharsetProvider.MAZOVIA_CHARSET_NAME)));

Result is printed " B4}B23@aBcDC] "

For example 1. : 3}012345678012

okey got it!

char[] b = "DWZ:3:1585543:5".toCharArray();
    final char[] start = {
            27,16,66,
            15, //length of code
            66 //CODE 128 mode B
    };

Last question... how Can I put a length of b to start (in 15 place)

0

There are 0 best solutions below