sendData
Sends a print document created using the Builder class.
• If you are using a Bluetooth connection, it may not be able to detect the offline status,
and timeout errors may occur.
• If you are using a Bluetooth connection, it may not be able to detect that the printer's
power is off.
Syntax
public void sendData(Builder builder, int timeout
, int[] status) throws EposException
Parameter
builder :
Specifies a Builder class instance. For details on the Builder class, refer to
(p.39).
timeout :
Specifies the transmission/reception waiting timeout time.
Specifies an integer in the range 0-600000 (in milliseconds).
status :
The printer status when command transmission ended is set. A combination of printer
status settings is set. For details, refer to
In an exception occurs, use the
printer status.
Exceptions
When processing fails, EposException is thrown with one of the following error values.
Error status
ERR_PARAM
ERR_ILLEGAL
ERR_PROCESSING
ERR_TIMEOUT
ERR_CONNECT
ERR_MEMORY
ERR_OFF_LINE
ERR_FAILURE
Printer Status List
getPrinterStatus (p.94)
Invalid parameter was passed.
This API was called when communication had not started yet.
Could not execute process.
Could not send all the data within the specified time.
Connection error occurred
Could not allocate memory.
The printer was offline.
An unspecified error occurred.
Chapter 4 API Reference
(p.37).
with exception processing to get the
Description
Builder class
4
91