Skip to main content

sendData

sendData​

Sends the print command.

Parameters​

timeout (optional)​

  • number

Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

ValueDescriptionDefault
5000 to 600000*Timeout period (in milliseconds)10000

Returns​

Promise<PrinterStatusResponse>

Errors​

Error statusDescription
ERR_PARAMAn invalid parameter was passed.
ERR_MEMORYNecessary memory could not be allocated.
ERR_FAILUREAn unknown error occurred.
ERR_PROCESSINGCould not run the process.
ERR_ILLEGALThe control commands have not been buffered. This API was called while no communication had been started.
CODE_ERR_AUTORECOVERAutomatic recovery error occurred.
CODE_ERR_COVER_OPENCover open error occurred.
CODE_ERR_CUTTERAuto cutter error occurred.
CODE_ERR_MECHANICALMechanical error occurred.
CODE_ERR_EMPTYNo paper is left in the roll paper end detector.
CODE_ERR_UNRECOVERABLEUnrecoverable error occurred.
CODE_ERR_FAILUREError exists in the requested document syntax.
CODE_ERR_NOT_FOUNDPrinter specified by the device ID does not exist.
CODE_ERR_SYSTEMError occurred with the printing system.
CODE_ERR_PORTError was detected with the communication port.
CODE_ERR_TIMEOUTPrint timeout occurred.
CODE_ERR_JOB_NOT_FOUNDSpecified print job ID does not exist.
CODE_ERR_SPOOLERPrint queue is full.
CODE_ERR_BATTERY_LOWBattery has run out.
CODE_ERR_TOO_MANY_REQUESTSThe number of print jobs sent to the printer has exceeded the allowable limit.
CODE_ERR_REQUEST_ENTITY_TOO_LARGEThe size of the print job data exceeds the capacity of the printer.
CODE_ERR_WAIT_REMOVALPrint command sent while waiting for paper removal.

Supplementary explanation​

  • For Bluetooth connection, the offline status may not be detected and a timeout error may occur.
  • To get the "adapter" or "batteryLevel" status, you need to enable transmission of power on/off and bat- tery status using Epson TM Utility.
  • To get the "paperTakenSensor" status, you need to enable the "Paper Taken Sensor Status" setting using Epson TM Utility.