Closed YESMAD123 closed 10 months ago
I think your printer is not compatible with many ESC POS command. Try to change size, make bold, black background, and many other option that a standard ESP POS printer do, and show me the result.
The black background white text does not work (it does not matter), below are the examples:
ok so this is the black background initialization that write the r. You have to remove command from EscPosPrinterCommands class.
public static final byte[] TEXT_COLOR_BLACK = new byte[]{0x1B, 0x72, 0x00};
public static final byte[] TEXT_COLOR_RED = new byte[]{0x1B, 0x72, 0x01};
public static final byte[] TEXT_COLOR_REVERSE_OFF = new byte[]{0x1D, 0x42, 0x00};
public static final byte[] TEXT_COLOR_REVERSE_ON = new byte[]{0x1D, 0x42, 0x01};
new byte[0];
for this four constants. public static final byte[] TEXT_COLOR_BLACK = new byte[0];
public static final byte[] TEXT_COLOR_RED = new byte[0];
public static final byte[] TEXT_COLOR_REVERSE_OFF = new byte[0];
public static final byte[] TEXT_COLOR_REVERSE_ON = new byte[0];
I tried the two solutions above but not working, so I deleted the lines of the four constants and after that I also deleted the
public static final byte[] TEXT_UNDERLINE_LARGE = new byte[]{0x1B, 0x2D, 0x02};
public static final byte[] TEXT_DOUBLE_STRIKE_OFF = new byte[]{0x1B, 0x47, 0x00};
public static final byte[] TEXT_DOUBLE_STRIKE_ON = new byte[]{0x1B, 0x47, 0x01};
but the " r" is still printed. Extra information: The SUNMI printer can support sticker printing.
Hi DantSu, any other solution to the " r" printing problem?
Change your printer OR fork, remove some code and run the application. If you can't do that, don't use this library.
Alright, thank you
Hi DantSu,
" r" (r with two " " before it) will be printed at the beginning of text each time I printed something. It only happened at the SUNMI inner printer connected with Bluetooth.
I have tried all the ways in the thread #258 (Create MyEscPosPrinterCommands extends EscPosPrinterCommands, and comment the line 'this.printerConnection.write(textColor);' in EscPosPrinterCommands.java) but none of them worked. Could you help to fix the problem?