Select your printer model
onreceive event
Receives the print result.
Syntax
Function (response) |
Parameters of callback function
Parameter: response
Object type: Object
response object properties
Property |
Description |
Object type |
---|---|---|
success |
Print result |
Boolean |
code |
Error code |
String |
status |
Status |
Number |
battery |
Battery status |
Number |
printjobid |
Print job ID |
String |
success
Value |
Description |
---|---|
true |
|
false |
|
code
Value |
Description |
---|---|
'EPTR_AUTOMATICAL' |
Automatic recovery error occurred. |
'EPTR_BATTERY_LOW' |
Battery has run out. |
'EPTR_COVER_OPEN' |
Cover open error occurred. |
'EPTR_CUTTER' |
Auto cutter error occurred. |
'EPTR_MECHANICAL' |
Mechanical error occurred. |
'EPTR_REC_EMPTY' |
Roll paper has run out. |
'EPTR_UNRECOVERABLE' |
Unrecoverable error occurred. |
'SchemaError' |
Print request XML contains a syntax error. |
'DeviceNotFound' |
Printer specified by the device ID does not exist. |
'PrintSystemError' |
Error occurred with the printing system. |
'EX_BADPORT' |
Error was detected with the communication port. |
'EX_TIMEOUT' |
Print timeout occurred. |
'EX_SPOOLER' |
Print queue is full. |
'JobNotFound' |
Specified job ID does not exist. |
'Printing' |
Printing |
'TooManyRequests' |
The number of print jobs sent to the printer has exceeded the allowable limit. |
'RequestEntityTooLarge' |
The size of the print job data exceeds the capacity of the printer. |
'JobSpooling' |
Job is spooling. |
'ERROR_WAIT_EJECT' |
Waiting for paper removal |
status
Perform an AND operation with a constant.
Constant (status) |
Description |
---|---|
ASB_NO_RESPONSE |
No response from printer |
ASB_PRINT_SUCCESS |
Print finished/spool completed |
ASB_DRAWER_KICK |
Drawer kick connector pin No.3 status = "H" |
ASB_BATTERY_OFFLINE |
Offline status due to the battery level |
ASB_OFF_LINE |
Offline status |
ASB_COVER_OPEN |
Cover open |
ASB_PAPER_FEED |
Paper is being fed by the paper feed switch. |
ASB_PANEL_SWITCH |
Panel switch is being operated. |
ASB_MECHANICAL_ERR |
Mechanical error occurred. |
ASB_AUTOCUTTER_ERR |
Auto cutter error occurred. |
ASB_UNRECOVER_ERR |
Unrecoverable error occurred. |
ASB_AUTORECOVER_ERR |
Automatic recovery error occurred. |
ASB_RECEIPT_NEAR_END |
Roll paper has almost run out. |
ASB_RECEIPT_END |
Roll paper has run out. |
ASB_BUZZER |
Buzzer is sounding (supported model only) |
ASB_WAIT_REMOVE_LABEL |
Waiting for labels to be peeled. |
ASB_NO_LABEL |
No labels awaiting peeling. |
ASB_SPOOLER_IS_STOPPED |
Spooler stopped |
battery
- AC adapter connection status
-
Constant (battery)
Description
0x30XX
Connected
0x31XX
Not connected
- Remaining battery capacity
-
Constant (battery)
Description
0xXX36
Remaining battery capacity 6
0xXX35
Remaining battery capacity 5
0xXX34
Remaining battery capacity 4
0xXX33
Remaining battery capacity 3
0xXX32
Remaining battery capacity 2
0xXX31
Remaining battery capacity 1 (almost run out)
0xXX30
Remaining battery capacity 0 (run out)
printjobid
Value |
Description |
---|---|
printjobid |
Print job ID |
Supplementary explanation
- For a model without battery, 0xXX30 is set to the battery constant.
- When there is no print job ID, "" (blank character) is set in printjobid.
- No onreceive event is notified if a communication error occurs.
To notify the disconnection event, implement the onreconnecting event, onreconnect event, ondisconnect event. - If a communication error occurs and it is deemed that no recovery will take place,
notify ondisconnect event.
Since no onreceive event is notified in this case, detect print failures in ondisconnect event.
Quick Access
- [Name]
- [Format]
- [Range]
- [Description]
- [Notes]
- Introduction
- help
- ePOSDevice object
- Common to device objects
- OtherPeripheral object
- Display object
- createWindow method
- destroyWindow method
- setCurrentWindow method
- clearWindow method
- addCreateScreen method
- addCreateScreenCustom method
- createTextArea method
- destroyTextArea method
- setCurrentTextArea method
- clearTextArea method
- setCursorPosition method
- moveCursorPosition method
- setCursorType method
- addText method
- addReverseText method
- addMarquee method
- setBlink method
- setBrightness method
- addBackgroundColor method
- addStartSlideShow method
- addStopSlideShow method
- addDownloadImage method
- addRegisterDownloadImage method
- addNVImage method
- addClearImage method
- addSymbol method
- addClearSymbol method
- showClock method
- addCommand method
- send method
- reset method
- onreceive event
- Keyboard object
- POSKeyboard object
- MSR object
- Printer object
- addTextAlign method
- addTextLineSpace method
- addTextRotate method
- addText method
- addTextLang method
- addTextFont method
- addTextSmooth method
- addTextDouble method
- addTextSize method
- addTextStyle method
- addTextPosition method
- addTextVPosition method
- addFeedUnit method
- addFeedLine method
- addFeedPosition method
- addFeed method
- addImage method
- addLogo method
- addBarcode method
- addSymbol method
- addHLine method
- addVLineBegin method
- addVLineEnd method
- addPageBegin method
- addPageEnd method
- addPageArea method
- addPageDirection method
- addPagePosition method
- addPageLine method
- addPageRectangle method
- addRotateBegin method
- addRotateEnd method
- addCut method
- addPulse method
- addSound method
- addLayout method
- recover method
- addRecovery method
- reset method
- addReset method
- addCommand method
- send method
- print method
- getPrintJobStatus method
- startMonitor method
- stopMonitor method
- halftone property
- brightness property
- force property
- timeout property
- interval property
- drawerOpenLevel property
- message property
- onreceive event
- onstatuschange event
- onbatterystatuschange event
- ononline event
- onoffline event
- onpoweroff event
- oncoverok event
- oncoveropen event
- onpaperok event
- onpapernearend event
- onpaperend event
- ondrawerclosed event
- ondraweropen event
- onbatteryok event
- onbatterylow event
- HybridPrinter2 object
- lock method
- unlock method
- selectPaperType method
- waitInsertion method
- cancelInsertion method
- ejectPaper method
- sendData method
- print method
- readMicrData method
- cleanMicrReader method
- recover method
- reset method
- startMonitor method
- stopMonitor method
- setMessage method
- getMessage method
- halftone property
- brightness property
- force property
- paperType property
- interval property
- waitTime property
- enable40cplMode property
- onreceive event
- Scanner object
- SimpleSerial object
- GermanyFiscalElement object
- DeviceHubTerminal object
- CommBoxManager object
- CommBox object
- ePosDeviceConfiguration object
- Appendix
- Error Code List
- Key code list
- List of Supported Objects
- List of Supported APIs
- Printer-specific Support Information
- TM-m10
- TM-m30
- TM-m30II
- TM-m30II-H
- TM-m30II-NT
- TM-m30II-S
- TM-m30II-SL
- TM-m30III
- TM-m30III-H
- TM-m50
- TM-m50II
- TM-m50II-H
- TM-T20II
- TM-T20III
- TM-T82III
- TM-T88VI
- TM-T88VII
- TM-L100
- TM-T70
- TM-T70II
- TM-T88IV
- TM-T88V
- TM-U220
- TM-U220II
- TM-U330
- TM-P20
- TM-P20II
- TM-P60II (Receipt)
- TM-P60II (Peeler)
- TM-P80
- TM-P80II
- TM-H6000V
- TM-T20II-i
- TM-T70-i
- TM-T82II-i
- TM-T83II-i
- TM-T88V-i
- TM-T88VI-iHUB
- TM-U220-i
- TM-U220IIB-i
- TM-T70II-DT
- TM-T70II-DT2
- TM-T88V-DT
- TM-T88VI-DT2
- TM-H6000IV-DT
- TM-T20
- TM-T82II
- TM-T83II
- TM-T90
- TM-L90
- TM-H6000IV
- Usage restriction by firmware version