I'm trying to write proper ESC/POS commands for 58mm POS thermal printer. I tried to input this commands as ASCII text and also converted it to HEX, but in both cases printer print just this code, not receipt output. Something wrong is with code, can no find examples of working code(not commands).
ESC @
ESC a SOH
ESC ! NUL
ESC t 25 (select character code table)
ESC a 1.49 (centering text)
ESC E 1
Bold text
ESC E 0
Text line 1
Text line 2
Text line 3
ESC a 0
Date/Time: January 14, 2002 15:00
ESC d &H03
ESC a 0
ESC! 1
TM-U210B $20.00
&H0A
Item 1 $20.00
&H0A
Item 2 $10.00
&H0A
&H0A
ESC ! D
TOTAL $30.00
LF
ESC! NUL
------------------------------
LF
PAID $30.00
LF
CHANGE $ 0.00
LF
Thank you!
GS k m d...dk NUL
I want get printed receipt like this sample. The available commands for printer commands is here. Can someone show me the proper code for this?