I am trying to send data to a thermal printer directly.
I have the following test data:
raw_data = bytes ("This is a test", "utf-8")
I would like to include two initial bytes to build the sequence ESC+@ (character ESC is ASCII 27) to initialize the printer.
How shall I do that?
使用\\033
表示ESC
字符。
raw_data = bytes ("\033@This is a test", "utf-8")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.