Added in Version 1.0.0

StarPrinter

The class that controls the printer

Constructor

StarPrinter(connectionSettings: StarConnectionSettings)

Initialize object

Property

Default value

Type

information

Printer information

undefined

StarPrinterInformation | undefined

connectionSettings

Printer connection settings

Value set in constructor

StarConnectionSettings

template

Template

undefined

string | undefined

errorDetail

Error details

-

Promise<StarIO10ErrorDetail>

printerDelegate

Status event for the printer

new PrinterDelegate()

PrinterDelegate

drawerDelegate

Status event for the cash drawer

new DrawerDelegate()

DrawerDelegate

inputDeviceDelegate

Status event for an input device

new InputDeviceDelegate()

InputDeviceDelegate

displayDelegate

Status event for the customer display

new DisplayDelegate()

DisplayDelegate

openTimeout

Open timeout (msec)

10000

number

printTimeout

Print timeout (msec)

30000

number

getStatusTimeout

Get status timeout (msec)

5000

number

starConfigurationTimeout

Set/Get Star Configuration timeout(msec)

90000

number

Method

open()

Open the printer

print(command: string)

Print

print(command: string, starSpoolJobSettings: StarSpoolJobSettings)

Print using the printer’s spooler function

printRawData(data: Array<number>)

Print binary data

getStatus()

Get the printer status

getSpoolJobStatus(jobId: number)

Get the print job status of the specified print job ID

getSpoolJobStatusList(size: number)

Get the print job history (List of print job status) for the specified number of jobs from the most recent.

getStarConfiguration(password: string? = null)

Get the present Star Configuration

getDefaultStarConfiguration()

Get the default Star Configuration

setStarConfiguration(starConfiguration: string)

Set Star Configuration

close()

Close the printer

dispose()

Dispose the object