- DOWNLOAD
- TECH.REFERENCE
- ESC/POS Command for TM Printer
- Character Code Tables for TM Printer
- ESC/POS Command for Customer Displays
- Character Code Tables for Customer Displays
- Epson ePOS SDK for Android
- Epson ePOS SDK for iOS
- Epson ePOS SDK for JavaScript
- Epson ePOS SDK for Universal Windows apps
- ePOS-Device XML
- ePOS-Print XML
- TM-INTELLIGENT
List of ePOS-Device XMLs
The ePOS-Device XMLs provide the following.
Message
These XMLs are messages requested from applications to the printer and returned from the printer to applications.
The number of messages in the data sent in one request from the application is 1.
To send multiple messages, send the data again for the number of times corresponding to the number of messages.
Message |
Description |
|
---|---|---|
Message data for communication path |
Establishes the communication path. |
|
Reestablishes the communication path. |
||
Disconnects the communication path. |
||
Message data for management information |
Acquires the administrator and installation location information. |
|
Opens the communication box. |
||
Closes the communication box. |
||
Communicates between applications. |
||
Message data for device communication |
Opens communication with a device. |
|
Closes communication with a device. |
||
Requests for device control. |
||
Responds to device control. |
||
Message data for OFSC-Print Service |
Requests for OFSC-Print Service. |
|
Responds to OFSC-Print Service. |
||
Message data for error notification |
Reports the error contents upon error occurrence. |
CommunicationBox Messages
These XMLs are used to communicate data between applications.
This type of XML is a child element of the <data> element of the <commbox_data> message and specifies data for data communication between applications. Specify the type of message data with the <type> element, and then specify data for the child element. Available <type> elements are as listed below.
<type> element |
Description |
|
---|---|---|
Transmission history |
<Request>/<Response> |
|
Transmission |
<Request> |
|
Reception |
<Response> |
Device Messages
These XMLs store request and response data for each device controlled. This type of XML is a child element of the <data> element of the <device_data> message and specifies data to control a device. Components of the message data differs depending on the device type. Specify the type of message data with the <type> element, and then specify data for the child element.
Printers and customer displays can use the control XMLs to control print data and display.
Refer to Supported Printers by XMLs for the types of devices available for each printer.
Device type |
Control XML |
---|---|
- |
|
- |
|
- |
|
- |
|
- |
|
- |
|
- |
|
- |
DeviceHubTerminal
Controls the TM-DT series.
<type> element |
Description |
|
---|---|---|
Shutdown |
<Request> |
|
<Response> |
||
Restart |
<Request> |
|
<Response> |
BarcodeScanner
Controls the scanner to read a barcode.
<type> element |
Description |
|
---|---|---|
Data detection |
<Response> |
Printer
Controls printing operation of the printer.
Refer to PrinterControl XML for details of print data.
<type> element |
Description |
|
---|---|---|
Controls a printer. |
<Request> |
|
<Response> |
HybridPrinter
Controls the hybrid model printers.
Refer to PrinterControl XML for details of print data.
<type> element |
Description |
|
---|---|---|
Device lock |
<Request> |
|
<Request> |
||
Receipt printing |
<Request> |
|
<Response> |
||
Slip printing |
<Request> |
|
<Request> |
||
<Request> |
||
Endorsement printing |
<Request> |
|
<Request> |
||
<Request> |
||
Validation printing |
<Request> |
|
<Request> |
||
<Request> |
||
MICR |
<Request> |
|
<Request> |
||
<Request> |
||
Paper eject |
<Request> |
|
Reception of result |
<Response> |
List of control operations
<type>element available for HybridPrinter message data depends on the operation to control.
The following lists control operation types and available <type>element.
<type>element |
Control operation |
||||
---|---|---|---|---|---|
Receipt |
Slip |
Endorsement |
Validation |
MICR |
|
? |
? |
? |
? |
? |
|
? |
? |
? |
? |
? |
|
? |
? |
? |
? |
- |
|
? |
? |
? |
? |
- |
|
- |
? |
- |
- |
- |
|
- |
? |
- |
- |
- |
|
- |
? |
- |
- |
- |
|
- |
- |
? |
- |
- |
|
- |
- |
? |
- |
- |
|
- |
- |
? |
- |
- |
|
- |
- |
- |
? |
- |
|
- |
- |
- |
? |
- |
|
- |
- |
- |
? |
- |
|
- |
- |
- |
- |
? |
|
- |
- |
- |
- |
? |
|
- |
- |
- |
- |
? |
|
- |
? |
? |
? |
? |
|
? |
? |
? |
? |
? |
CustomerDisplay
Controls text display on the customer display.
Refer to CustomerDisplayControl XML for details of display data.
<type> element |
Description |
|
---|---|---|
Controls a customer display. |
<Request> |
|
<Response> |
Keyboard
Controls character entry from the keyboard.
<type> element |
Description |
|
---|---|---|
Key detection |
<Response> |
|
String setting |
<Request> |
|
String detection |
<Response> |
|
Key code setting |
<Request> |
|
Data detection |
<Response> |
POSKeyboard
Controls character entry from the POS keyboard.
<type> element |
Description |
|
---|---|---|
Data detection |
<Response> |
MSR
Controls card reading by MSR.
<type> element |
Description |
|
---|---|---|
Data detection |
<Response> |
SerialDevice
Controls serial communication between the printer and device.
<type> element |
Description |
|
---|---|---|
String setting |
<Request> |
|
Detects acknowledgment. |
<Response> |
Storage
Connects to the German fiscal element (TSE), and controls data read/write operations.
<type> element |
Description |
|
---|---|---|
Send |
<Request> |
|
Reception of result |
<Response> |
OtherPeripheral
Controls peripheral devices with a device control program.
<type> element |
Description |
|
---|---|---|
Send |
<Request> |
|
Reception of result |
<Response> |
PrinterControl XML
These XMLs are used to control print operations of a printer. <epos-print> is included in the child element printdata of the <type> element print, while <response> is included in the child element resultdata of the <type> element onxmlresult.
<epos-print> and <response> can be used with the following <type> elements.
Device |
<type> element |
Child element |
XML document |
---|---|---|---|
printdata |
|||
resultdata |
|||
printdata |
|||
resultdata |
|||
printdata |
|||
Creating print document
These XMLs request the printer to execute a print function specified with <epos-print> and acquires the execution result with <response>.
Two print modes are available; standard and page modes.
- Standard mode
-
Prints data line by line. Line spacing is automatically adjusted according to character size, image size, and barcode height. Suitable for printing receipts whose print length varies by print content.
- Page mode
-
Prints page by page. Prints characters, images, and/or barcodes on a single page that is defined as a print area.
To print in the page mode, switch to the page mode using <page>.
XML document |
Child element |
Function |
Standard mode |
Page mode |
---|---|---|---|---|
Prints text. |
? |
? |
||
Paper feed |
? |
? |
||
Prints a raster image. |
? |
? |
||
Prints the NV logo. |
? |
? |
||
Prints a barcode. |
? |
? |
||
Prints a 2D symbol. |
? |
? |
||
Prints a horizontal ruled line. |
? |
- |
||
Starts printing a vertical ruled line. |
? |
- |
||
Ends printing a vertical ruled line. |
? |
- |
||
Switches to the page mode |
? |
- |
||
Defines the print area in the page mode. |
- |
? |
||
Specifies the print direction in the page mode. |
- |
? |
||
Specifies the print position in the page mode. |
- |
? |
||
Draws a line in the page mode. |
- |
? |
||
Draws a shape in the page mode. |
- |
? |
||
Cuts the sheet. |
? |
- |
||
Kicks the drawer. |
? |
- |
||
Sounds the buzzer. |
? |
- |
||
Inserts a command. |
? |
? |
||
Sets the page layout. |
? |
- |
||
Recovers from a recoverable error. |
? |
- |
||
Resets the printer. |
? |
- |
||
Acquires the execution result. |
? |
? |
List of support per print method
Child element |
Print method |
||||
---|---|---|---|---|---|
Receipt |
Slip |
Endorsement |
Endorsement (40cpl) |
Validation |
|
? |
? |
? |
? |
? |
|
? |
? |
? |
? |
? |
|
? |
- |
- |
- |
- |
|
? |
- |
- |
- |
- |
|
? |
- |
- |
- |
- |
|
? |
- |
- |
- |
- |
|
? |
- |
- |
- |
- |
|
? |
- |
- |
- |
- |
|
? |
- |
- |
- |
- |
|
? |
? |
- |
- |
? |
|
? |
? |
- |
- |
? |
|
? |
? |
- |
- |
? |
|
? |
? |
- |
- |
? |
|
? |
? |
- |
- |
- |
|
? |
? |
- |
- |
- |
|
? |
- |
- |
- |
- |
|
? |
? |
? |
? |
? |
|
? |
- |
- |
- |
- |
|
? |
? |
? |
? |
? |
|
? |
- |
- |
- |
- |
|
? |
? |
? |
? |
? |
|
? |
? |
? |
? |
? |
List of child element default values
The default values of the child elements are listed below.
These values are effective before executing a child element defined on the printer device.
Child element |
Attribute |
Default value |
---|---|---|
lang |
“en” |
|
font |
“font_a” |
|
smooth |
“false” / “0” |
|
dw |
“false” / “0” |
|
dh |
“false” / “0” |
|
width |
“1” |
|
height |
“1” |
|
reverse |
“false” / “0” |
|
ul |
“false” / “0” |
|
em |
“false” / “0” |
|
color |
“color_1” |
|
x |
“0” |
|
y |
“21” |
|
align |
“left” |
|
rotate |
“false” / “0” |
|
linespc |
Depends on the printer model. For details, refer to Printer-specific Support Information. |
|
linespc |
||
color |
“color_1” |
|
align |
“left” |
|
mode |
“mono” |
|
align |
“left” |
|
hri |
“none” |
|
font |
“font_a” |
|
width |
“3” |
|
height |
“162” |
|
align |
“left” |
|
rotate |
“false” / “0” |
|
level |
Depends on the 2D symbol type. Refer to <symbol> for details. |
|
width |
||
hight |
||
size |
||
align |
“left” |
|
rotate |
“false” / “0” |
|
x |
“0” |
|
y |
“0” |
|
width |
Depends on the printer model. For details, refer to Printer-specific Support Information. |
|
height |
||
dir |
“left_to_right” |
|
x |
“0” |
|
y |
“21” |
CustomerDisplayControl XML
These XMLs control text display on the customer display. <epos-display> and <response> are XMLs included in the child element displaydata of <type>display</type> and the child element resultdata of <type>onxmlresult</type>, respectively. These XMLs request the customer display to execute a function specified with <epos-display> and acquires the execution result with <response>.
XML document |
Child element |
Function |
---|---|---|
Configures the window. |
||
Displays text. |
||
Displays cursor. |
||
Blinks display. |
||
Changes the display brightness. |
||
Displays a marquee. |
||
Displays the clock. |
||
Clears the current display area. |
||
Reset |
||
Runs a command. |
||
Acquires the execution result of <epos-display>. |
The default values of the child elements are listed below.
These values are effective before executing a child element defined on the device.
ePOS-Device XML includes patented or patent pending functions.
The contents must not be disclosed to third parties.