148
onreceive event
This property registers the callback function and obtains a response message receipt event.
Syntax
Function (response)
Parameter of the callback function
Parameters: response(See“Propertiesoftheresponseobject”onpage148.)
Name: Responsemessage
Objecttype: Object
Properties of the response object
Value of success
Va lu e o f cod e
Property Name Object type
success (p. 148) Print result Boolean
code (p. 148) Error code String
status (p. 149) Status Number
battery (p. 150) Battery status Number
Value Description
true or 1
Printing succeeded.
false or 0
Printing failed.
Value Description
'EPTR_AUTOMATICAL'
An automatically recoverable error occurred
'EPTR_COVER_OPEN'
A cover open error occurred
'EPTR_CUTTER'
An autocutter error occurred
'EPTR_MECHANICAL'
A mechanical error occurred
'EPTR_REC_EMPTY'
No paper in roll paper end sensor
'EPTR_UNRECOVERABLE'
An unrecoverable error occurred
'SchemaError'
The request document contains a syntax error
'DeviceNotFound'
The printer with the specified device ID does not
exist
'PrintSystemError'
An error occurred on the printing system
'EX_BADPORT'
An error was detected on the communication port
'EX_TIMEOUT'
A print timeout occurred