API version 31
iOSAndroidWindows
説明 |
印字をキャンセルします。
|
|
呼出形式 |
smapri.CancelPrint( sendCommand );
|
|
戻り値 |
なし
|
|
引数 |
boolean sendCommand |
プリンタに印字をキャンセルするコマンドを送信するかどうか $TRUEの場合、未送信の印字データを削除したうえで、プリンタに印字キャンセルのコマンドを送信します。 $FALSEの場合、未送信の印字データの削除のみ実行します。
|
例外 |
SMAPRI-1 |
プリンタが設定されていません。 |
|
SMAPRI-2 |
フォーマットが設定されていません。 |
|
SMAPRI-7 |
プリンタと接続していません。 |
|
SMAPRI-8 |
コマンドの送信に失敗しました
|
使用例 |
SmaPri sm; Button btnPrintFormat { X = 10; Y = 40; Width = 50; Height = 20; Title = "Print format"; Function OnTouch(e) { var item = new SmaPriInputItem[2]; item[0].FormatId = 1; item[0].PrintNum = 1; item[0].SetData("文字列1", "ABCD"); item[0].SetData("バーコード1", "hello world!"); item[1].FormatId = 2; item[1].PrintNum = 1; item[1].SetData("固定グラフィック", "http://192.168.1.15/image/sample.bmp"); item[1].SetData("切替グラフィック", "1"); var extended = new Array(); extended["print_operation"] = "1,3,3"; extended["print_offset"] = "50,50"; ^.sm.PrintFormat(item, extended); } } Button btnCancelPrint { X = 70; Y = 40; Width = 50; Height = 20; Title = "Cancel print"; Function OnTouch(e) { ^.sm,CancelPrint($TRUE); } }
|
|
関連項目 |
PrintFormatメソッド |