94
getPrinterStatus
Acquires the printer status from an exception that occurred in sendData (p.91).
Syntax
public int getPrinterStatus()
Return value
Returns the printer status. A combination of printer status settings is set.
For details, refer to Printer Status List (p.37).
Example
int[] printerStatus = new int[1];
printerStatus[0] = 0;
int timeout = 1000;
try {
printer.sendData(builder, timeout, printerStatus);
} catch (EposException e) {
int errSratus = e.getErrorStatus();
if (errStatus == EposException.ERR_TIMEOUT) {
printerStatus[0] = e.getPrinterStatus();
}
}
if ((printerStatus[0] & Print.ST_PRINT_SUCCESS) == Print.ST_PRINT_SUCCESS)
{
///Process///
}
To acquire the printer status from EposException.