Select your printer model
<type>print</type>
Sends print data and configuration data to the printer and requests it for printing. The request result is acquired by the <type>onxmlresult</type> element.
Request
Child element |
Data type |
Description |
---|---|---|
timeout |
int |
Specifies the timeout for the request in milliseconds. Value: 1000 to 300000 (integer) |
printjobid |
string |
Specifies the print job ID (optional). |
printdata |
string |
Specifies data to print. |
Print data size
The following lists the maximum sizes of the print data that can be sent at one shot.
When sending print data whose size exceeds the limit, separate the data.
- TM-m30: 2MB
- TM-DT Series/TM-i Series:
-
Version
Printing Speed
TM-DT Software
TM-i Firmware
300 mm/s
200 mm/s
2.5 or earlier
4.0 or earlier
200 KB
133 KB
-
4.1
400 KB
267 KB
3.0 or later
4.3 or later
4 MB
2.67 MB
Sample program
- Request A: Does not specify the print job ID.
-
<data> <type>print</type> <timeout>10000</timeout> <printdata> <!-- Printer Control XML --> <epos-print xmlns= . . </epos-print> </printdata> </data>
- Request B: Specifies the print job ID.
-
<device_data> <device_id>local_printer</device_id> <data> <type>print</type> <timeout>60000</timeout> <printjobid>ABC123</printjobid> <printdata> <epos-print xmlns="http://www.epson-pos.com/schemas/2011/03/epos-print"> <text>Hello, World! </text> <cut /> </epos-print> </printdata> </data> </device_data>
- Request C: Acquires the print result when the spooler function is enabled.
-
<device_data> <device_id>local_printer</device_id> <data> <type>print</type> <printjobid>123</printjobid> <timeout>60000</timeout> <printdata> <epos-print xmlns="http://www.epson-pos.com/schemas/2011/03/epos-print"/> </printdata> </data> </device_data>
Supplementary explanation
- The print job ID can be specified using alphanumeric characters, underscore, hyphen, and period in 1 to 30 digits.
- Refer to PrinterControl XML for details of print data specified in the printdata child element.
- Blank print data needs to be sent to acquire the print result while the spooler function
is enabled.
Therefore, the child element of the <epos-print> element is not specified.
Quick Access
- [Name]
- [Format]
- [Range]
- [Description]
- [Notes]
- Introduction
- help
- Message
- CommunicationBox Messages
- Device Messages
- DeviceHubTerminal
- BarcodeScanner
- Printer
- <type>print</type>
- <type>onxmlresult</type>
- <epos-print>
- <response>
- <text>
- <feed>
- <image>
- <logo>
- <barcode>
- <symbol>
- <hline>
- <vline-begin>
- <vline-end>
- <page>
- <area>
- <direction>
- <position>
- <line>
- <rectangle>
- <cut>
- <pulse>
- <sound>
- <command>
- <layout>
- <recovery>
- <reset>
- <batch-begin>
- <batch-end>
- <rotate-begin>
- <rotate-end>
- HybridPrinter
- <type>lock</type>
- <type>unlock</type>
- <type>print</type>
- <type>onxmlresult</type>
- <type>slipwaitinsertion</type>
- <type>slipprint2</type>
- <type>slipcancel</type>
- <type>endorsewaitinsertion</type>
- <type>endorseprint2</type>
- <type>endorsecancel</type>
- <type>validationwaitinsertion</type>
- <type>validationprint2</type>
- <type>validationcancel</type>
- <type>micrread</type>
- <type>micrcleaning</type>
- <type>micrcancel</type>
- <type>eject</type>
- <type>onreceive</type>
- CustomerDisplay
- Keyboard
- POSKeyboard
- MSR
- SerialDevice
- Storage
- OtherPeripheral
- Appendix