Added in Version 1.0.0

StarPrinter

プリンターを制御するクラス

コンストラクタ

StarPrinter(connectionSettings: StarConnectionSettings)

オブジェクトの初期化

プロパティ

初期値

information

プリンターの情報

undefined

StarPrinterInformation | undefined

connectionSettings

プリンターとの接続設定

コンストラクタでセットされた値

StarConnectionSettings

template

テンプレート

undefined

string | undefined

errorDetail

エラーの詳細

-

Promise<StarIO10ErrorDetail>

printerDelegate

プリンターのステータスイベント

new PrinterDelegate()

PrinterDelegate

drawerDelegate

キャッシュドロアーのステータスイベント

new DrawerDelegate()

DrawerDelegate

inputDeviceDelegate

入力機器のステータスイベント

new InputDeviceDelegate()

InputDeviceDelegate

displayDelegate

カスタマーディスプレイのステータスイベント

new DisplayDelegate()

DisplayDelegate

openTimeout

接続タイムアウト(msec)

10000

number

printTimeout

印刷タイムアウト(msec)

30000

number

getStatusTimeout

ステータス取得タイムアウト(msec)

5000

number

starConfigurationTimeout

Star Configuration設定・取得タイムアウト(msec)

90000

number

メソッド

open()

プリンターと接続

print(command: string)

プリンターに印刷を実行

print(command: string, starSpoolJobSettings: StarSpoolJobSettings)

プリンターのスプーラー機能を利用して印刷を実行

printRawData(data: Array<number>)

プリンターにバイナリデータの印刷を実行

getStatus()

プリンターのステータスを取得

getSpoolJobStatus(jobId: number)

指定した印刷ジョブの印刷ジョブステータスを取得

getSpoolJobStatusList(size: number)

最新から指定された件数分のプリンターの印刷ジョブ履歴(印刷ジョブステータスのリスト)を取得

getStarConfiguration(password: string? = null)

プリンターの現在のStar Configurationを取得

getDefaultStarConfiguration()

プリンターのデフォルトのStar Congirutaionを取得

setStarConfiguration(starConfiguration: string)

プリンターにStar Configurationの設定を実行

close()

プリンターと切断

dispose()

オブジェクトの破棄