What is ESC POS ?
ESC POS is a set of proprietary POS Receipt printer command system invented by EPSON, which includes command makes it possible to build a highly flexible POS system. It is compatible with all POS Receipt printers and customer display, and provides flexibility for future upgrades. It is widely popular all over the world. ESC/POS© is designed to reduce host load in POS environment. It consists of a series of highly functional and efficient commands to realize the full potential of the printer.
How do I use it ?
The ESC POS command set is actually to use some specified characters to adjust the format of the ticket and send it to the ticket printer through various printer interfaces. The command supports three formats: ASCII, Decimal, and HEX.
For example: the following HSPOS receipt printer prints a self-test page command, send HEX 12 54 or ASCII DC2 T to the printer, and the printer will print a self-test page by itself.
Name: Printing test paper
Format :ASCII:DC2 T
Decimal:18 94
HEX:12 54
Description :Printing test page Range Default
Below I'll print a line "welcome to hspos" with the command and center it in bold. It is then sent to the printer via the USB interface.
In order to do the test, I need to use the interface test tool below. The download address is as follows:
1B 40 Initialize the printer
1B 61 01 Center the text
1B 45 01 Bold font
57 65 6C 63 6F 6D 65 20 74 6F 20 48 53 50 4F 53 0D 0A “Welcome to HSPOS” text
1B 64 05 Feed 2 lines
We got this HEX command, and then we need to send it to the printer in the form of HEX. For the convenience of testing, we use the HSPOS receipt printer test tool.
1. Connect the printer, select the USB port, and then open the port
2. Select the CMD option, and select HEX to send the command to the printer。
3. The final print out is as follows: