Skip to main content

getPrinterSetting

getPrinterSetting​

Acquires the set value of the printer setting. The value acquired by this API is notified to the listener method specified in the listener parameter.

Parameters​

type​

  • PrinterGetSettingsType

Specifies the printer setting item to be acquired.

ValueDescription
PrinterConstants.PRINTER_SETTING_PAPERWIDTHPaper width
PrinterConstants.PRINTER_SETTING_PRINTDENSITYPrint density
PrinterConstants.PRINTER_SETTING_PRINTSPEEDPrint speed

timeout (optional)​

  • number

Specifies the timeout period before completion of printing in milliseconds.

ValueDescriptionDefault
5000 to 600000Timeout period (in milliseconds)10000

Returns​

Promise<PrinterSettingsResponse>

Errors​

Error statusDescription
ERR_PARAMAn invalid parameter was passed.
ERR_FAILUREAn unknown error occurred.
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_PARAMAn invalid parameter was passed.
CODE_ERR_MEMORYMemory necessary for processing could not be allocated.
CODE_ERR_TIMEOUTPrint timeout occurred.
CODE_ERR_PROCESSINGCould not run the process.
CODE_ERR_ILLEGALThis API was called while no communication had been started.
CODE_ERR_FAILUREError exists in the requested document syntax.

Supplementary explanation​

  • Do not turn off the power supply to the printer while executing this API.
  • This API cannot be used with SSL/TLS communication.