我正在尝试为 58mm POS 热敏打印机编写正确的 ESC/POS 命令。我尝试将此命令作为 ASCII 文本输入,并将其转换为 HEX,但在这两种情况下,打印机都只打印此代码,而不是收据输出。代码有问题,找不到工作代码的示例(不是命令)。
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