barcode in android printer Bluetooh

Asked

Viewed 360 times

0

I can print anything but the barcode I currently use:

            byte[] cmd = new byte[3];
            cmd[0] = 0x1b;
            cmd[1] = 0x21;
            cmd[2] &= 0xEF;
            out.write(cmd);
            out.write("Mensagem de teste \n".getBytes());

The printer is the ZJ-5802DD, I’ve tried several codes, downloaded some language manuals:

http://content.epson.de/fileadmin/content/files/RSD/downloads/escpos.pdf

To print the barcode would look like this:

    String content = "1234567890";
    byte[] contents = content.getBytes();
    byte[] formats  = {(byte) 0x1d, (byte) 0x6b, (byte) 0x49, (byte)content.length()};
    byte[] bytes    = new byte[formats.length + contents.length];
    System.arraycopy(formats, 0, bytes, 0, formats.length );
    System.arraycopy(contents, 0, bytes, formats.length, contents.length);
    out.write(bytes);

But it doesn’t work, I saw here post where they say they can get to the same printer, because it supports, but they didn’t post the code :(

  • Check those SDK help: http://www.intersite.co.th/UserFiles/files/PP5802LD-SDK-FOR-Android.rar http://www.intersite.co.th/index.php?m=download

  • The link is broken :(

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.