Star Micronics Printer API

Printer Status

Example Result JavaScript API Calls Used
Printer Enabled in App Settings kp_StarPrinter_requestStateOfSupporting
returns kp_StarPrinter_stateOfSupportingDidChange
kp_StarPrinter_requestStatusOfPrinter
returns kp_StarPrinter_statusOfPrinterDidChange once for each error type shown below
Printer Offline returned by kp_StarPrinter_statusOfPrinterDidChange
Overflow Error
Cut Error
Paper Low Error
Out of Paper Error
Paper Jam Error
Print Pending

Printing

Example Result JavaScript API Calls Used
Status of Last Print Call returned after any of the print calls below through
kp_StarPrinter_printDidFinish
or kp_StarPrinter_printDidFailWithError

element ID:
send cut*:
kp_StarPrinter_printHtml

text to encode:
send cut*:
kp_StarPrinter_printCode39

text to encode:
send cut*:
kp_StarPrinter_printCode93

text to encode:
send cut*:
kp_StarPrinter_printCode128
kp_StarPrinter_printDocumentAtURL

text to encode:
send cut*:
kp_StarPrinter_printQRCode
* cut command can be triggered through the JavaScript print calls above or can be configured to run automatically following any print call through the app's 'Cut Paper On' setting

Character Set

Example Result JavaScript API Calls Used

reference number:
kp_StarPrinter_selectCodePage

Cash Drawer

Example Result JavaScript API Calls Used
kp_StarPrinter_requestCashDrawerStatus
returns kp_StarPrinter_statusOfCashDrawerDidChange
or kp_StarPrinter_statusOfCashDrawerDidFailWithError
kp_StarPrinter_openCashDrawer
returns kp_StarPrinter_statusOfCashDrawerDidChange
or kp_StarPrinter_statusOfCashDrawerDidFailWithError


The section below is used as the default 'printHTMLTest' element for the 'Print HTML Element' sample.

Test H3

Test sentence.