4.2. ISCBBuilder¶
プリンタ制御用コマンドを生成する機能を提供します。
列挙体
名称
説明
初期化指定定数
フォントスタイル指定定数
コードページ指定定数
国際文字指定定数
ロゴサイズ指定定数
位置揃え指定定数
用紙カット指定定数
キャッシュドロアーチャネル指定定数
サウンド/ブザーチャネル指定定数
バーコードシンボル指定定数
バーコード幅指定定数
PDF417 ECC(セキュリティレベル)指定定数
QRコードモデル指定定数
QRコード誤り訂正レベル指定定数
ビットマップ回転指定定数
ブラックマーク指定定数
印字領域タイプ指定定数
CJK統合漢字のフォント指定定数
用紙保持制御の指定定数
用紙保持ステータス指定定数
プロパティ
名称
説明
生成、追加されたコマンド列です。
メソッド
名称
説明
ドキュメント開始コマンドを生成し、コマンドバッファに追加します。
ドキュメント終了コマンドを生成し、コマンドバッファに追加します。
初期化コマンドを生成し、コマンドバッファに追加します。
データ(テキストやコマンド)を、コマンドバッファに追加します。
生のデータ(テキストやコマンド)を、コマンドバッファに追加します。
フォントスタイル指定コマンドを生成し、コマンドバッファに追加します。
コードページ指定コマンドを生成し、コマンドバッファに追加します。
国際文字指定コマンドを生成し、コマンドバッファに追加します。
行単位の用紙送りコマンドを生成し、コマンドバッファに追加します。
1ドットライン単位の用紙送りコマンドを生成し、コマンドバッファに追加します。
文字間スペース設定コマンドを生成し、コマンドバッファに追加します。
行間スペース設定コマンドを生成し、コマンドバッファに追加します。
トップマージン設定コマンドを生成し、コマンドバッファに追加します。
強調指定コマンドを生成し、コマンドバッファに追加します。
白黒反転指定コマンドを生成し、コマンドバッファに追加します。
拡大指定コマンドを生成し、コマンドバッファに追加します。
アンダーライン指定コマンドを生成し、コマンドバッファに追加します。
ロゴ印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定コマンドを生成し、コマンドバッファに追加します。
位置揃え指定コマンドを生成し、コマンドバッファに追加します。
クリアコマンドを生成し、コマンドバッファに追加します。
用紙カットコマンドを生成し、コマンドバッファに追加します。
キャッシュドロアー駆動コマンドを生成し、コマンドバッファに追加します。
サウンド/ブザー駆動コマンドを生成し、コマンドバッファに追加します。
バーコード印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定バーコード印刷コマンドを生成し、コマンドバッファに追加します。
位置揃えバーコード印刷コマンドを生成し、コマンドバッファに追加します。
PDF417印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定PDF417印刷コマンドを生成し、コマンドバッファに追加します。
位置揃えPDF417印刷コマンドを生成し、コマンドバッファに追加します。
QRコード印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定QRコード印刷コマンドを生成し、コマンドバッファに追加します。
位置揃えQRコード印刷コマンドを生成し、コマンドバッファに追加します。
ビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定ビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
位置揃えビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
ブラックマークコマンドを生成し、コマンドバッファに追加します。
ページモード開始コマンドを生成し、コマンドバッファに追加します。
ページモード終了コマンドを生成し、コマンドバッファに追加します。
ページモードの縦方向絶対位置指定コマンドを生成し、コマンドバッファに追加します。
ページモード印刷方向コマンドを生成し、コマンドバッファに追加します。
印字領域設定コマンドを生成し、コマンドバッファに追加します。
UTF-8におけるCJK統合漢字のフォント設定コマンドを生成し、コマンドバッファに追加します。
プリンターファームウェアによる用紙保持制御の指定コマンドを生成し、コマンドバッファに追加します。
用紙保持ステータス指定コマンドを生成し、コマンドバッファに追加します。
各モデルにおいて機能するメソッドは以下のとおりです。
モデル/エミュレーション |
mC-Print2 | mC-Print3 | mPOP | FVP10 | TSP100IV | TSP100IIIW | TSP100IIIBI | TSP100IIIU | TSP100IIU+ | TSP100ECO | TSP100U | TSP100GT | TSP100LAN | TSP650II | TSP650IISK | TSP700II | TSP800II | SM-S210i | SM-S220i | SM-S230i | SM-T300i/T300 | SM-T400i | BSC10 | SM-L200 | SM-L300 | SP700 | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StarPRNT | StarPRNT | StarPRNT | StarLine | StarPRNT | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarLine | StarLine | StarLine | StarLine | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | EscPos | StarPRNT | StarPRNT | StarDotImpact | |
beginDocument |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
endDocument |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendInitialization |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendData |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendRawData |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendFontStyle |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | ✔ | ✔ | ✔ |
appendCodePage |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendInternational |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendLineFeed |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendUnitFeed |
✔ | ✔ | ✔ | ✔ | ✔ | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendCharacterSpace |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendLineSpace |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendTopMargin |
- | ✔[2][3] | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
appendEmphasis |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendInvert |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendMultiple |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendMultipleHeight |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendMultipleWidth |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendUnderLine |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendLogo |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[4] | ✔ | ✔[4] | ✔ | ✔[4] | ✔ | ✔[4] | ✔ | ✔[4] | ✔ | ✔ | ✔ | ✔ |
appendAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendHorizontalTabPosition |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | ✔ | ✔ | ✔ |
appendCutPaper |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔ | ✔[5] | ✔[5] | ✔ |
appendPeripheral |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | - | - | ✔ | - | - | ✔ |
appendSound |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | - | - | ✔ | - | - | ✔ |
appendBarcodeData [6] |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendBarcodeDataWithAbsolutePosition [6] |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendBarcodeDataWithAlignment [6] |
✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔ | ✔ | - |
appendPdf417Data |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendPdf417DataWithAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendPdf417DataWithAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔ | ✔ | - |
appendQrCodeData |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendQrCodeDataWithAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendQrCodeDataWithAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔ | ✔ | - |
appendBitmap |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔ | ✔ | ✔ |
appendBitmapWithAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔ | ✔ | ✔ |
appendBitmapWithAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7][8] | ✔ | ✔[7][8] | ✔ | ✔[7][8] | ✔ | ✔[7][8] | ✔ | ✔[7][8] | ✔ | ✔ | ✔ | ✔ |
appendBlackMark |
- | - | - | ✔ | - | - | - | - | - | - | - | - | - | - | - | ✔ | ✔ | - | - | - | - | - | - | ✔[9][10] | ✔[11] | ✔[9][10] | ✔[11] | ✔ | ✔[9][10] | ✔[10][11] | ✔ |
beginPageMode |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔[13] | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
endPageMode |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔[13] | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendPageModeVerticalAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔[13] | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendPageModeRotation |
✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔[13] | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendPrintableArea |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | - | - | ✔ | - | ✔ | ✔ |
appendCjkUnifiedIdeographFont |
✔ | ✔ | - | - | ✔ | - | - | - | - | - | - | - | - | ✔[12] | ✔ | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
appendHoldPrint |
- | - | - | - | - | - | - | - | - | - | - | - | - | - | ✔ | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
appendPaperPresentStatus |
- | - | - | - | - | - | - | - | - | - | - | - | - | - | ✔ | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
[1] | データ(テキストやコマンド)の追加は行わず、1ドットライン単位の用紙送りコマンドの追加のみ行う |
[2] | トップマージン設定が10mm以下の場合は、印字用紙長さ(カット長)が50mmを超えないようにすること。 (カットした用紙が残っている場合は、用紙詰まりが発生する可能性がある。カットした用紙を取り除いた状態では印字用紙長さの制限はなし) |
[3] | MCP30は非対応 |
[4] | 常にノーマルサイズ |
[5] | 用紙カットを行わない |
[6] | 印字されるバーコードが正常に読み取れることを実環境で確認すること。 |
[7] | 常に左揃え |
[8] | 縦方向の最大印刷可能領域は30cm (2400dot)まで |
[9] | 用紙表面のブラックマークのみ有効無効設定可能。用紙裏面のブラックマーク設定はプリンター側で有効にする必要あり(SM-T300i/T300は用紙裏面ブラックマーク非対応)。設定方法はハードウェアマニュアル参照のこと。 |
[10] | ライブラリバージョン 1.14.0 以降が必要。 |
[11] | プリンター側でブラックマーク設定を有効にする必要有り。設定方法はハードウェアマニュアル参照のこと。 |
[12] | JP2/TWモデルのファームウェアバージョン4.0以降が必要。 |
[13] | ファームウェアバージョン7.1以降が必要。 |
4.2.1. SCBInitializationType¶
初期化指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBInitializationType) { SCBInitializationTypeCommand };
定数
名称 説明 SCBInitializationTypeCommand コマンド初期化
4.2.2. SCBFontStyleType¶
フォントスタイル指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBFontStyleType) { SCBFontStyleTypeA, SCBFontStyleTypeB };
定数
名称 説明 SCBFontStyleTypeA フォントA(12 x 24ドット)/ 7 x 9フォント(ハーフドット) SCBFontStyleTypeB フォントB( 9 x 24ドット)/ 5 x 9フォント(2P-1)
4.2.3. SCBCodePageType¶
コードページ指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBCodePageType) { SCBCodePageTypeCP437, SCBCodePageTypeCP737, SCBCodePageTypeCP772, SCBCodePageTypeCP774, SCBCodePageTypeCP851, SCBCodePageTypeCP852, SCBCodePageTypeCP855, SCBCodePageTypeCP857, SCBCodePageTypeCP858, SCBCodePageTypeCP860, SCBCodePageTypeCP861, SCBCodePageTypeCP862, SCBCodePageTypeCP863, SCBCodePageTypeCP864, SCBCodePageTypeCP865, SCBCodePageTypeCP866, SCBCodePageTypeCP869, SCBCodePageTypeCP874, SCBCodePageTypeCP928, SCBCodePageTypeCP932, SCBCodePageTypeCP998, SCBCodePageTypeCP999, SCBCodePageTypeCP1001, SCBCodePageTypeCP1250, SCBCodePageTypeCP1251, SCBCodePageTypeCP1252, SCBCodePageTypeCP2001, SCBCodePageTypeCP3001, SCBCodePageTypeCP3002, SCBCodePageTypeCP3011, SCBCodePageTypeCP3012, SCBCodePageTypeCP3021, SCBCodePageTypeCP3041, SCBCodePageTypeCP3840, SCBCodePageTypeCP3841, SCBCodePageTypeCP3843, SCBCodePageTypeCP3844, SCBCodePageTypeCP3845, SCBCodePageTypeCP3846, SCBCodePageTypeCP3847, SCBCodePageTypeCP3848, SCBCodePageTypeUTF8, SCBCodePageTypeBlank };
定数
名称 説明 SCBCodePageTypeCP437 CodePage 437 (USA, Std. Europe) SCBCodePageTypeCP737 Codepage 737 (Greek) SCBCodePageTypeCP772 Codepage 772 (Lithuanian) SCBCodePageTypeCP774 Codepage 774 (Lithuanian) SCBCodePageTypeCP851 Codepage 851 (Greek) SCBCodePageTypeCP852 Codepage 852 (Latin-2) SCBCodePageTypeCP855 Codepage 855 (Cyrillic Bulgarian) SCBCodePageTypeCP857 Codepage 857 (Turkey) SCBCodePageTypeCP858 Codepage 858 (Multilingual) SCBCodePageTypeCP860 Codepage 860 (Portuguese) SCBCodePageTypeCP861 Codepage 861 (Icelandic) SCBCodePageTypeCP862 Codepage 862 (Israel (Hebrew)) SCBCodePageTypeCP863 Codepage 863 (Canadian French) SCBCodePageTypeCP864 Codepage 864 (Arabic) SCBCodePageTypeCP865 Codepage 865 (Nordic) SCBCodePageTypeCP866 Codepage 866 (Cyrillic Russian) SCBCodePageTypeCP869 Codepage 869 (Greek) SCBCodePageTypeCP874 Codepage 874 (Thai) SCBCodePageTypeCP928 Codepage 928 (Greek) SCBCodePageTypeCP932 Katakana SCBCodePageTypeCP998 Normal SCBCodePageTypeCP999 Codepage 1252 (Windows Latin-1) SCBCodePageTypeCP1001 Codepage 1001 (Arabic) SCBCodePageTypeCP1250 Codepage 1250 (Windows Latin-2) SCBCodePageTypeCP1251 Codepage 1251 (Windows Cyrillic) SCBCodePageTypeCP1252 Codepage 1252 (Windows Latin-1) SCBCodePageTypeCP2001 Codepage 2001 (Lithuanian-KBL) SCBCodePageTypeCP3001 Codepage 3001 (Estonian-1) SCBCodePageTypeCP3002 Codepage 3002 (Estonian-2) SCBCodePageTypeCP3011 Codepage 3011 (Latvian-1) SCBCodePageTypeCP3012 Codepage 3012 (Latvian-2) SCBCodePageTypeCP3021 Codepage 3021 (Bulgarian) SCBCodePageTypeCP3041 Codepage 3041 (Maltese) SCBCodePageTypeCP3840 Codepage 3840 (IBM-Russian) SCBCodePageTypeCP3841 Codepage 3841 (Gost) SCBCodePageTypeCP3843 Codepage 3843 (Polish) SCBCodePageTypeCP3844 Codepage 3844 (CS2) SCBCodePageTypeCP3845 Codepage 3845 (Hungarian) SCBCodePageTypeCP3846 Codepage 3846 (Turkish) SCBCodePageTypeCP3847 Codepage 3847 (Brazil-ABNT) SCBCodePageTypeCP3848 Codepage 3848 (Brazil-ABICOMP) SCBCodePageTypeUTF8 UTF-8 SCBCodePageTypeBlank User Setting Blank Code Page
4.2.4. SCBInternationalType¶
国際文字指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBInternationalType) { SCBInternationalTypeUSA, SCBInternationalTypeFrance, SCBInternationalTypeGermany, SCBInternationalTypeUK, SCBInternationalTypeDenmark, SCBInternationalTypeSweden, SCBInternationalTypeItaly, SCBInternationalTypeSpain, SCBInternationalTypeJapan, SCBInternationalTypeNorway, SCBInternationalTypeDenmark2, SCBInternationalTypeSpain2, SCBInternationalTypeLatinAmerica, SCBInternationalTypeKorea, SCBInternationalTypeIreland, SCBInternationalTypeLegal };
定数
名称 説明 SCBInternationalTypeUSA アメリカ SCBInternationalTypeFrance フランス SCBInternationalTypeGermany ドイツ SCBInternationalTypeUK イギリス SCBInternationalTypeDenmark デンマーク SCBInternationalTypeSweden スウェーデン SCBInternationalTypeItaly イタリア SCBInternationalTypeSpain スペイン SCBInternationalTypeJapan 日本 SCBInternationalTypeNorway ノルウェー SCBInternationalTypeDenmark2 デンマーク II SCBInternationalTypeSpain2 スペイン II SCBInternationalTypeLatinAmerica ラテンアメリカ SCBInternationalTypeKorea 韓国 SCBInternationalTypeIreland アイルランド SCBInternationalTypeLegal Legal
4.2.5. SCBLogoSize¶
ロゴサイズ指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBLogoSize) { SCBLogoSizeNormal, SCBLogoSizeDoubleWidth, SCBLogoSizeDoubleHeight, SCBLogoSizeDoubleWidthDoubleHeight };
定数
名称 説明 SCBLogoSizeNormal ノーマルモード SCBLogoSizeDoubleWidth 横2倍モード SCBLogoSizeDoubleHeight 縦2倍モード SCBLogoSizeDoubleWidthDoubleHeight 縦2倍、横2倍モード
4.2.6. SCBAlignmentPosition¶
位置揃え指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBAlignmentPosition) { SCBAlignmentPositionLeft, SCBAlignmentPositionCenter, SCBAlignmentPositionRight };
定数
名称 説明 SCBAlignmentPositionLeft 左揃え SCBAlignmentPositionCenter 中心揃え SCBAlignmentPositionRight 右揃え
4.2.7. SCBCutPaperAction¶
用紙カット指定定数です。
宣言
typedef NS_ENUM(NSInteger, SCBCutPaperAction) { SCBCutPaperActionFullCut, SCBCutPaperActionPartialCut, SCBCutPaperActionFullCutWithFeed, SCBCutPaperActionPartialCutWithFeed };
定数
名称 説明 SCBCutPaperActionFullCut フルカット SCBCutPaperActionPartialCut パーシャルカット SCBCutPaperActionFullCutWithFeed 用紙送り付きフルカット SCBCutPaperActionPartialCutWithFeed 用紙送り付きパーシャルカット
4.2.8. SCBPeripheralChannel¶
キャッシュドロアーチャネル指定定数です。
宣言
typedef NS_ENUM(NSInteger, SCBPeripheralChannel) { SCBPeripheralChannelNo1, SCBPeripheralChannelNo2 };
定数
名称 説明 SCBPeripheralChannelNo1 チャネル1 SCBPeripheralChannelNo2 チャネル2
4.2.9. SCBSoundChannel¶
サウンド/ブザーチャネル指定定数です。
宣言
typedef NS_ENUM(NSInteger, SCBSoundChannel) { SCBSoundChannelNo1, SCBSoundChannelNo2 };
定数
名称 説明 SCBSoundChannelNo1 チャネル1 SCBSoundChannelNo2 チャネル2
4.2.10. SCBBarcodeSymbology¶
バーコードシンボル指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBBarcodeSymbology) { SCBBarcodeSymbologyUPCE, SCBBarcodeSymbologyUPCA, SCBBarcodeSymbologyJAN8, SCBBarcodeSymbologyJAN13, SCBBarcodeSymbologyCode39, SCBBarcodeSymbologyITF, SCBBarcodeSymbologyCode128, SCBBarcodeSymbologyCode93, SCBBarcodeSymbologyNW7 };
定数
名称 説明 SCBBarcodeSymbologyUPCE UPC-E SCBBarcodeSymbologyUPCA UPC-A SCBBarcodeSymbologyJAN8 JAN/EAN8 SCBBarcodeSymbologyJAN13 JAN/EAN13 SCBBarcodeSymbologyCode39 Code39 SCBBarcodeSymbologyITF ITF SCBBarcodeSymbologyCode128 Code128 SCBBarcodeSymbologyCode93 Code93 SCBBarcodeSymbologyNW7 NW7
4.2.11. SCBBarcodeWidth¶
バーコード幅指定定数です。
ExtModeを指定することで、コマンド仕様に準拠したバーコードモードが指定されます。
宣言
typedef NS_ENUM(NSUInteger, SCBBarcodeWidth) { SCBBarcodeWidthMode1, SCBBarcodeWidthMode2, SCBBarcodeWidthMode3, SCBBarcodeWidthMode4, SCBBarcodeWidthMode5, SCBBarcodeWidthMode6, SCBBarcodeWidthMode7, SCBBarcodeWidthMode8, SCBBarcodeWidthMode9, SCBBarcodeWidthExtMode1, SCBBarcodeWidthExtMode2, SCBBarcodeWidthExtMode3, SCBBarcodeWidthExtMode4, SCBBarcodeWidthExtMode5, SCBBarcodeWidthExtMode6, SCBBarcodeWidthExtMode7, SCBBarcodeWidthExtMode8, SCBBarcodeWidthExtMode9 };
定数
名称
説明
ライブラリバージョン
SCBBarcodeWidthMode1
モード1
1.3.0+ SCBBarcodeWidthMode2
モード2
1.3.0+ SCBBarcodeWidthMode3
モード3
1.3.0+ SCBBarcodeWidthMode4
モード4
1.3.0+ SCBBarcodeWidthMode5
モード5
1.3.0+ SCBBarcodeWidthMode6
モード6
1.3.0+ SCBBarcodeWidthMode7
モード7
1.3.0+ SCBBarcodeWidthMode8
モード8
1.3.0+ SCBBarcodeWidthMode9
モード9
1.3.0+ SCBBarcodeWidthExtMode1
Extモード1
1.13.0+ SCBBarcodeWidthExtMode2
Extモード2
1.13.0+ SCBBarcodeWidthExtMode3
Extモード3
1.13.0+ SCBBarcodeWidthExtMode4
Extモード4
1.13.0+ SCBBarcodeWidthExtMode5
Extモード5
1.13.0+ SCBBarcodeWidthExtMode6
Extモード6
1.13.0+ SCBBarcodeWidthExtMode7
Extモード7
1.13.0+ SCBBarcodeWidthExtMode8
Extモード8
1.13.0+ SCBBarcodeWidthExtMode9
Extモード9
1.13.0+
4.2.12. SCBPdf417Level¶
PDF417 ECC(セキュリティレベル)指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBPdf417Level) { SCBPdf417LevelECC0, SCBPdf417LevelECC1, SCBPdf417LevelECC2, SCBPdf417LevelECC3, SCBPdf417LevelECC4, SCBPdf417LevelECC5, SCBPdf417LevelECC6, SCBPdf417LevelECC7, SCBPdf417LevelECC8 };
定数
名称 説明 SCBPdf417LevelECC0 セキュリティレベル0 SCBPdf417LevelECC1 セキュリティレベル1 SCBPdf417LevelECC2 セキュリティレベル2 SCBPdf417LevelECC3 セキュリティレベル3 SCBPdf417LevelECC4 セキュリティレベル4 SCBPdf417LevelECC5 セキュリティレベル5 SCBPdf417LevelECC6 セキュリティレベル6 SCBPdf417LevelECC7 セキュリティレベル7 SCBPdf417LevelECC8 セキュリティレベル8
4.2.13. SCBQrCodeModel¶
QRコードモデル指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBQrCodeModel) { SCBQrCodeModelNo1, SCBQrCodeModelNo2 };
定数
名称 説明 SCBQrCodeModelNo1 モデル1 SCBQrCodeModelNo2 モデル2
4.2.14. SCBQrCodeLevel¶
QR コード誤り訂正レベル指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBQrCodeLevel) { SCBQrCodeLevelL, SCBQrCodeLevelM, SCBQrCodeLevelQ, SCBQrCodeLevelH };
定数
名称 説明 SCBQrCodeLevelL 誤り訂正レベルL SCBQrCodeLevelM 誤り訂正レベルM SCBQrCodeLevelQ 誤り訂正レベルQ SCBQrCodeLevelH 誤り訂正レベルH
4.2.15. SCBBitmapConverterRotation¶
ビットマップ回転指定定数です。
宣言
typedef NS_ENUM(NSUInteger, SCBBitmapConverterRotation) { SCBBitmapConverterRotationNormal, SCBBitmapConverterRotationRight90, SCBBitmapConverterRotationLeft90, SCBBitmapConverterRotationRotate180 };
定数
名称 説明 SCBBitmapConverterRotationNormal 回転なし SCBBitmapConverterRotationRight90 右90度 回転 SCBBitmapConverterRotationLeft90 左90度 回転 SCBBitmapConverterRotationRotate180 180度 回転
4.2.16. SCBBlackMarkType¶
added in version 1.6.0
ブラックマーク指定定数です。
宣言
typedef NS_ENUM(NSInteger, SCBBlackMarkType) { SCBBlackMarkTypeInvalid, SCBBlackMarkTypeValid, SCBBlackMarkTypeValidWithDetection };
定数
名称 説明 SCBBlackMarkTypeInvalid ブラックマーク無効 SCBBlackMarkTypeValid ブラックマーク有効 SCBBlackMarkTypeValidWithDetection ブラックマーク有効 + ブラックマーク検出動作
4.2.17. SCBPrintableAreaType¶
added in version 1.9.0
印字領域タイプ指定定数です。
宣言
typedef NS_ENUM(NSInteger, SCBPrintableAreaType) { SCBPrintableAreaTypeStandard, SCBPrintableAreaTypeType1, SCBPrintableAreaTypeType2, SCBPrintableAreaTypeType3, SCBPrintableAreaTypeType4 }
定数
名称 説明 SCBPrintableAreaTypeStandard 標準タイプ SCBPrintableAreaTypeType1 タイプ1 SCBPrintableAreaTypeType2 タイプ2 SCBPrintableAreaTypeType3 タイプ3 SCBPrintableAreaTypeType4 タイプ4
4.2.18. SCBCjkUnifiedIdeographFont¶
added in version 1.13.0
CJK統合漢字のフォント指定定数です。
宣言
typedef NS_ENUM(NSInteger, SCBCjkUnifiedIdeographFont) { SCBCjkUnifiedIdeographFontJapanese = 1, SCBCjkUnifiedIdeographFontSimplifiedChinese = 2, SCBCjkUnifiedIdeographFontTraditionalChinese = 3, SCBCjkUnifiedIdeographFontHangul = 4 };
定数
名称 説明 SCBCjkUnifiedIdeographFontJapanese 日本語フォント SCBCjkUnifiedIdeographFontSimplifiedChinese 簡体字中国語フォント SCBCjkUnifiedIdeographFontTraditionalChinese 繁体字中国語フォント SCBCjkUnifiedIdeographFontHangul 韓国語フォント
4.2.19. SCBHoldPrintType¶
added in version 1.15.0
用紙保持制御の指定定数です。
宣言
typedef NS_ENUM(NSInteger, SCBHoldPrintType) { SCBHoldPrintTypeInvalid = 1, SCBHoldPrintTypeValid = 2, SCBHoldPrintTypeDefault = 3, };
定数
名称 説明 SCBHoldPrintTypeInvalid 用紙保持制御無効 SCBHoldPrintTypeValid 用紙保持制御有効 SCBHoldPrintTypeDefault メモリスイッチ設定に従う
4.2.20. SCBPaperPresentStatusType¶
added in version 1.15.0
用紙保持ステータス指定定数です。
宣言
typedef NS_ENUM(NSInteger, SCBPaperPresentStatusType) { SCBPaperPresentStatusTypeInvalid = 1, SCBPaperPresentStatusTypeValid = 2, SCBPaperPresentStatusTypeDefault = 3, };
定数
名称 説明 SCBPaperPresentStatusTypeInvalid 用紙保持ステータス無効 SCBPaperPresentStatusTypeValid 用紙保持ステータス有効 SCBPaperPresentStatusTypeDefault メモリスイッチ設定に従う
4.2.21. commands¶
コマンドバッファを取得します。
宣言
@property (nonatomic, readonly) NSMutableData *commands;
引数
なし
戻り値
説明 型 コマンドバッファ NSMutableData *
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m を参照ください。
4.2.22. beginDocument¶
ドキュメント開始コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)beginDocument;
引数
なし
戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.23. endDocument¶
ドキュメント終了コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)endDocument;
引数
なし
戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.24. appendInitialization¶
初期化コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendInitialization:(SCBInitializationType)type;
引数
名称 説明 型 type 初期化タイプ SCBInitializationType 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendUnderLine:YES]; [builder appendMultiple:2 height:2]; [builder appendData:otherData]; [builder appendInitialization:SCBInitializationTypeCommand]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.25. appendData¶
データ(テキストやコマンド)を、コマンドバッファに追加します。
宣言
- (void)appendByte:(unsigned char)data; - (void)appendData:(NSData *)otherData; - (void)appendBytes:(const void *)bytes length:(NSUInteger)length;
引数
名称 説明 型 dataotherDatabytesデータ(テキストやコマンド) unsigned charNSData *const void *length データ長 NSUInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World." dataUsingEncoding:NSASCIIStringEncoding]; unsigned char bytes[] = {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e}; NSUInteger length = sizeof(bytes); ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendByte:'\n']; [builder appendBytes:bytes length:length]; [builder appendByte:'\n']; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.26. appendRawData¶
生のデータ(テキストやコマンド)を、コマンドバッファに追加します。
宣言
- (void)appendRawByte:(unsigned char)data; - (void)appendRawData:(NSData *)otherData; - (void)appendRawBytes:(const void *)bytes length:(NSUInteger)length;
引数
名称 説明 型 dataotherDatabytes生のデータ(テキストやコマンド) unsigned charNSData *const void *length データ長 NSUInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation image:(UIImage *)image { ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendBitmap:image diffusion:NO]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
4.2.27. appendFontStyle¶
フォントスタイル指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendFontStyle:(SCBFontStyleType)type;
引数
名称 説明 型 type フォントスタイル SCBFontStyleType 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendFontStyle:SCBFontStyleTypeA]; [builder appendData:otherData]; [builder appendFontStyle:SCBFontStyleTypeB]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.28. appendCodePage¶
コードページ指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendCodePage:(SCBCodePageType)type;
引数
名称 説明 型 type コードページ SCBCodePageType 戻り値
なし
実装例
+ (NSData *)createCodePageData:(StarIoExtEmulation)emulation { unsigned char bytes8[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x0a}; unsigned char bytes9[] = {0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0x0a}; unsigned char bytesA[] = {0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0x0a}; unsigned char bytesB[] = {0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0x0a}; unsigned char bytesC[] = {0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0x0a}; unsigned char bytesD[] = {0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0x0a}; unsigned char bytesE[] = {0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x0a}; unsigned char bytesF[] = {0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x0a}; NSUInteger length = sizeof(bytes2); ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendCodePage:SCBCodePageTypeCP932]; [builder appendBytes:bytes8 length:length]; [builder appendBytes:bytes9 length:length]; [builder appendBytes:bytesA length:length]; [builder appendBytes:bytesB length:length]; [builder appendBytes:bytesC length:length]; [builder appendBytes:bytesD length:length]; [builder appendBytes:bytesE length:length]; [builder appendBytes:bytesF length:length]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.29. appendInternational¶
国際文字指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendInternational:(SCBInternationalType)type;
引数
名称 説明 型 type 国際文字 SCBInternationalType 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { unsigned char bytes[] = {0x23, 0x24, 0x40, 0x58, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x60, 0x7b, 0x7c, 0x7d, 0x7e, 0x0a}; NSUInteger length = sizeof(bytes); ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendInternational:SCBInternationalTypeUSA]; [builder appendBytes:bytes length:length]; [builder appendInternational:SCBInternationalTypeJapan]; [builder appendBytes:bytes length:length]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.30. appendLineFeed¶
行単位の用紙送りコマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendLineFeed; - (void)appendDataWithLineFeed:(NSData *)otherData; - (void)appendBytesWithLineFeed:(const void *)bytes length:(NSUInteger)length; - (void)appendLineFeed:(NSInteger)line; - (void)appendDataWithLineFeed:(NSData *)otherData line:(NSInteger)line; - (void)appendBytesWithLineFeed:(const void *)bytes length:(NSUInteger)length line:(NSInteger)line;
引数
名称 説明 型 line 紙送り量(行数単位) NSInteger otherDatabytesデータ(テキストやコマンド) NSData *const void *length データ長 NSUInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World." dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendLineFeed]; [builder appendDataWithLineFeed:otherData]; [builder appendData:otherData]; [builder appendLineFeed:2]; [builder appendDataWithLineFeed:otherData line:2]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.31. appendUnitFeed¶
1ドットライン単位の用紙送りコマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendUnitFeed:(NSInteger)unit; - (void)appendDataWithUnitFeed:(NSData *)otherData unit:(NSInteger)unit; - (void)appendBytesWithUnitFeed:(const void *)bytes length:(NSUInteger)length unit:(NSInteger)unit;
引数
名称 説明 型 unit 紙送り量(ドット数単位) NSInteger otherDatabytesデータ(テキストやコマンド) NSData *const void *length データ長 NSUInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World." dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendUnitFeed:64]; [builder appendDataWithUnitFeed:otherData unit:64]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.32. appendCharacterSpace¶
文字間スペース設定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendCharacterSpace:(NSInteger)space;
引数
名称 説明 型 space 文字間スペース(ドット数単位) NSInteger 戻り値
なし
重要
日本語、中国語簡体字、中国語繁体字、韓国語(DBCS)では、文字間スペースが設定値の2倍になります。
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendCharacterSpace:0]; [builder appendData:otherData]; [builder appendCharacterSpace:4]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.33. appendLineSpace¶
行間スペース設定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendLineSpace:(NSInteger)lineSpace;
引数
名称 説明 型 lineSpace 行間スペース(ドット数単位) NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendLineSpace:32]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendLineSpace:24]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.34. appendTopMargin¶
added in version 1.9.0
トップマージン設定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendTopMargin:(NSInteger)margin;
引数
名称 説明 型 margin トップマージン(1ミリメートル単位) NSInteger 戻り値
なし
実装例
+ (NSData *)createTopMarginData:(StarIoExtEmulation)emulation { NSData *data = [@"Hello, World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:StarIoExtEmulationStarPRNT]; [builder beginDocument]; [builder appendTopMargin:2]; [builder appendData:[@"*Top margin:2mm*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendData:data]; [builder appendData:data]; [builder appendData:data]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder appendTopMargin:6]; [builder appendData:[@"*Top margin:6mm*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendData:data]; [builder appendData:data]; [builder appendData:data]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder appendTopMargin:11]; [builder appendData:[@"*Top margin:11mm*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendData:data]; [builder appendData:data]; [builder appendData:data]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return builder.commands; }
ApiFunctions.mを参照ください。
4.2.35. appendEmphasis¶
強調指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendEmphasis:(BOOL)emphasis; - (void)appendDataWithEmphasis:(NSData *)otherData; - (void)appendBytesWithEmphasis:(const void *)bytes length:(NSUInteger)length;
引数
名称 説明 型 emphasis 強調YES ... 強調設定NO ... 強調解除BOOL otherDatabytesデータ(テキストやコマンド) NSData *const void *length データ長 NSUInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherDataHalf0 = [@"Hello " dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherDataHalf1 = [@"World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendEmphasis:YES]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendEmphasis:NO]; [builder appendData:otherData]; [builder appendDataWithEmphasis:otherData]; [builder appendData:otherData]; [builder appendDataWithEmphasis:otherDataHalf0]; [builder appendData:otherDataHalf1]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.36. appendInvert¶
白黒反転指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendInvert:(BOOL)invert; - (void)appendDataWithInvert:(NSData *)otherData; - (void)appendBytesWithInvert:(const void *)bytes length:(NSUInteger)length;
引数
名称 説明 型 invert 白黒反転YES ... 白黒反転設定NO ... 白黒反転解除BOOL otherDatabytesデータ(テキストやコマンド) NSData *const void *length データ長 NSUInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherDataHalf0 = [@"Hello " dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherDataHalf1 = [@"World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendInvert:YES]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendInvert:NO]; [builder appendData:otherData]; [builder appendDataWithInvert:otherData]; [builder appendData:otherData]; [builder appendDataWithInvert:otherDataHalf0]; [builder appendData:otherDataHalf1]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.37. appendMultiple¶
拡大指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendMultiple:(NSInteger)width height:(NSInteger)height; - (void)appendDataWithMultiple:(NSData *)otherData width:(NSInteger)width height:(NSInteger)height; - (void)appendBytesWithMultiple:(const void *)bytes length:(NSUInteger)length width:(NSInteger)width height:(NSInteger)height; - (void)appendMultipleHeight:(NSInteger)height; - (void)appendDataWithMultipleHeight:(NSData *)otherData height:(NSInteger)height; - (void)appendBytesWithMultipleHeight:(const void *)bytes length:(NSUInteger)length height:(NSInteger)height; - (void)appendMultipleWidth:(NSInteger)width; - (void)appendDataWithMultipleWidth:(NSData *)otherData width:(NSInteger)width; - (void)appendBytesWithMultipleWidth:(const void *)bytes length:(NSUInteger)length width:(NSInteger)width;
引数
名称 説明 型 width 横倍率 NSInteger height 縦倍率 NSInteger otherDatabytesデータ(テキストやコマンド) NSData *const void *length データ長 NSUInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherDataHalf0 = [@"Hello " dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherDataHalf1 = [@"World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendMultiple:2 height:2]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendMultiple:1 height:1]; [builder appendData:otherData]; [builder appendDataWithMultiple:otherData width:2 height:2]; [builder appendData: otherData]; [builder appendDataWithMultiple:otherDataHalf0 width:2 height:2]; [builder appendData: otherDataHalf1]; [builder appendData:otherDataHalf0]; [builder appendDataWithMultiple:otherDataHalf1 width:2 height:2]; [builder appendMultipleHeight:2]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendMultipleHeight:1]; [builder appendData:otherData]; [builder appendDataWithMultipleHeight:otherDataHalf0 height:2]; [builder appendData:otherDataHalf1]; [builder appendData:otherDataHalf0]; [builder appendDataWithMultipleHeight:otherDataHalf1 height:2]; [builder appendMultipleWidth:2]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendMultipleWidth:1]; [builder appendData:otherData]; [builder appendDataWithMultipleWidth:otherDataHalf0 width:2]; [builder appendData:otherDataHalf1]; [builder appendData:otherDataHalf0]; [builder appendDataWithMultipleWidth:otherDataHalf1 width:2]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.38. appendUnderLine¶
アンダーライン指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendUnderLine:(BOOL)underLine; - (void)appendDataWithUnderLine:(NSData *)otherData; - (void)appendBytesWithUnderLine:(const void *)bytes length:(NSUInteger)length;
引数
名称 説明 型 underLine アンダーラインYES ... アンダーライン設定NO ... アンダーライン解除BOOL otherDatabytesデータ(テキストやコマンド) NSData *const void *length データ長 NSUInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherDataHalf0 = [@"Hello " dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherDataHalf1 = [@"World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendUnderLine:YES]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendUnderLine:NO]; [builder appendData:otherData]; [builder appendDataWithUnderLine:otherData]; [builder appendData:otherData]; [builder appendDataWithUnderLine:otherDataHalf0]; [builder appendData:otherDataHalf1]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.39. appendLogo¶
ロゴ印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendLogo:(SCBLogoSize)size number:(NSInteger)number;
引数
名称 説明 型 size ロゴサイズ SCBLogoSize number ロゴ番号 NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendLogo:SCBLogoSizeNormal number:1]; [builder appendLogo:SCBLogoSizeDoubleWidth number:1]; [builder appendLogo:SCBLogoSizeDoubleHeight number:1]; [builder appendLogo:SCBLogoSizeDoubleWidthDoubleHeight number:1]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.40. appendAbsolutePosition¶
絶対位置指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendAbsolutePosition:(NSInteger)position; - (void)appendDataWithAbsolutePosition:(NSData *)otherData position:(NSInteger)position; - (void)appendBytesWithAbsolutePosition:(const void *)bytes length:(NSUInteger)length position:(NSInteger)position;
引数
名称 説明 型 position 絶対位置(ドット数単位) NSInteger otherDatabytesデータ(テキストやコマンド) NSData *const void *length データ長 NSUInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendAbsolutePosition:40]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendDataWithAbsolutePosition:otherData position:40]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.41. appendAlignment¶
位置揃え指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendAlignment:(SCBAlignmentPosition)position; - (void)appendDataWithAlignment:(NSData *)otherData position:(SCBAlignmentPosition)position; - (void)appendBytesWithAlignment:(const void *)bytes length:(NSUInteger)length position:(SCBAlignmentPosition)position;
引数
名称 説明 型 position 位置揃え SCBAlignmentPosition otherDatabytesデータ(テキストやコマンド) NSData *const void *length データ長 NSUInteger 戻り値
なし
重要
appendBitmap、 appendBarcodeData、appendQrCodeData、appendPdf417Data メソッドと組み合わせての位置揃えはできません。 それぞれ appendBitmapWithAlignment、 appendBarcodeDataWithAlignment、appendQrCodeDataWithAlignment、appendPdf417DataWithAlignment メソッドをご利用ください。
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendAlignment:SCBAlignmentPositionRight]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendAlignment:SCBAlignmentPositionLeft]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendDataWithAlignment:otherData position:SCBAlignmentPositionRight]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.42. appendHorizontalTabPosition¶
added in version 1.8.0
水平タブ設定/クリアコマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendHorizontalTabPosition:(NSArray<NSNumber *> *)positions;
引数
名称 説明 型 positions 水平タブ位置(ANK文字ピッチ単位)の配列nil もしくは空の配列を指定した場合、現在設定されている水平タブ位置をすべてクリアします。NSArray<NSNumber *> * 戻り値
なし
実装例
+ (NSData *)createHorizontalTabPositionData:(StarIoExtEmulation)emulation { NSData *otherData1 = [@"QTY\tITEM\tTOTAL\n" dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherData2 = [@"1\tApple\t1.50\n" dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherData3 = [@"2\tOrange\t2.00\n" dataUsingEncoding:NSASCIIStringEncoding]; NSData *otherData4 = [@"5\tBanana\t3.00\n" dataUsingEncoding:NSASCIIStringEncoding]; NSArray<NSNumber *> *positions = @[@5, @27]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendHorizontalTabPosition:positions]; [builder appendData:[@"*Tab Position:5, 27*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendData:otherData1]; [builder appendData:otherData2]; [builder appendData:otherData3]; [builder appendData:otherData4]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.43. appendCutPaper¶
用紙カットコマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendCutPaper:(SCBCutPaperAction)action;
引数
名称 説明 型 action 用紙カット SCBCutPaperAction 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.44. appendPeripheral¶
キャッシュドロアー駆動コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendPeripheral:(SCBPeripheralChannel)channel; - (void)appendPeripheral:(SCBPeripheralChannel)channel time:(NSInteger)time;
引数
名称 説明 型 channel キャッシュドロアーチャネル SCBPeripheralChannel time 駆動時間(1ミリ秒単位)※チャネル1のみ有効NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendPeripheral:SCBPeripheralChannelNo1]; [builder appendPeripheral:SCBPeripheralChannelNo2]; [builder appendPeripheral:SCBPeripheralChannelNo1 time:2000]; [builder appendPeripheral:SCBPeripheralChannelNo2 time:2000]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.45. appendSound¶
サウンド/サウンド/ブザー駆動コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendSound:(SCBSoundChannel)channel; - (void)appendSound:(SCBSoundChannel)channel repeat:(NSInteger)repeat; - (void)appendSound:(SCBSoundChannel)channel repeat:(NSInteger)repeat driveTime:(NSInteger) driveTime delayTime:(NSInteger)delayTime
引数
名称
説明
型
ライブラリバージョン
channel サウンド/ブザーチャネル
1.3.0+ repeat 繰り返し回数
NSInteger
1.3.0+ driveTime 駆動時間(1ミリ秒単位)
NSInteger
1.9.0+ delayTime ディレイ時間(1ミリ秒単位)
NSInteger
1.9.0+ 戻り値
なし
警告
ブザー以外を接続して本メソッドを使用しないでください。正常動作しない場合や、プリンターおよび外部機器本体が破損する恐れがあります。
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendSound:SCBSoundChannelNo1]; [builder appendSound:SCBSoundChannelNo2]; [builder appendSound:SCBSoundChannelNo1 repeat:3]; [builder appendSound:SCBSoundChannelNo2 repeat:3]; [builder appendSound:SCBSoundChannelNo1 repeat:1 driveTime:1000 delayTime:1000]; [builder appendSound:SCBSoundChannelNo2 repeat:1 driveTime:1000 delayTime:1000]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.46. appendBarcodeData¶
バーコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendBarcodeData:(NSData *)otherData symbology:(SCBBarcodeSymbology)symbology width:(SCBBarcodeWidth)width height:(NSInteger)height hri:(BOOL)hri; - (void)appendBarcodeBytes:(const void *)bytes length:(NSUInteger)length symbology:(SCBBarcodeSymbology)symbology width:(SCBBarcodeWidth)width height:(NSInteger)height hri:(BOOL)hri;
引数
名称 説明 型 otherDatabytesバーコードデータ NSData *const void *length データ長 NSUInteger symbology バーコードシンボル SCBBarcodeSymbology width バーコード幅 SCBBarcodeWidth height バーコードの高さ(ドット数単位) NSInteger hri バー下文字列YES ... 印刷ありNO ... 印刷なしBOOL 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherDataCode128 = [@"{B0123456789" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendBarcodeData:otherDataCode128 symbology:SCBBarcodeSymbologyCode128 width:SCBBarcodeWidthMode1 height:40 hri:YES]; [builder appendUnitFeed:32]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.47. appendBarcodeDataWithAbsolutePosition¶
絶対位置指定バーコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendBarcodeDataWithAbsolutePosition:(NSData *)otherData symbology:(SCBBarcodeSymbology)symbology width:(SCBBarcodeWidth)width height:(NSInteger)height hri:(BOOL)hri position:(NSInteger)position; - (void)appendBarcodeBytesWithAbsolutePosition:(const void *)bytes length:(NSUInteger)length symbology:(SCBBarcodeSymbology)symbology width:(SCBBarcodeWidth)width height:(NSInteger)height hri:(BOOL)hri position:(NSInteger)position;
引数
名称 説明 型 position 絶対位置(ドット数単位) NSInteger otherDatabytesバーコードデータ NSData *const void *length データ長 NSUInteger symbology バーコードシンボル SCBBarcodeSymbology width バーコード幅 SCBBarcodeWidth height バーコードの高さ(ドット数単位) NSInteger hri バー下文字列YES ... 印刷ありNO ... 印刷なしBOOL 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherDataCode128 = [@"{B0123456789" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendBarcodeDataWithAbsolutePosition:otherDataCode128 symbology:SCBBarcodeSymbologyCode128 width:SCBBarcodeWidthMode1 height:40 hri:YES position:40]; [builder appendUnitFeed:32]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.48. appendBarcodeDataWithAlignment¶
位置揃えバーコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendBarcodeDataWithAlignment:(NSData *)otherData symbology:(SCBBarcodeSymbology)symbology width:(SCBBarcodeWidth)width height:(NSInteger)height hri:(BOOL)hri position:(SCBAlignmentPosition)position; - (void)appendBarcodeBytesWithAlignment:(const void *)bytes length:(NSUInteger)length symbology:(SCBBarcodeSymbology)symbology width:(SCBBarcodeWidth)width height:(NSInteger)height hri:(BOOL)hri position:(SCBAlignmentPosition)position;
引数
名称 説明 型 position 位置揃え指定 SCBAlignmentPosition otherDatabytesバーコードデータ NSData *const void *length データ長 NSUInteger symbology バーコードシンボル SCBBarcodeSymbology width バーコード幅 SCBBarcodeWidth height バーコードの高さ(ドット数単位) NSInteger hri バー下文字列YES ... 印刷ありNO ... 印刷なしBOOL 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherDataCode128 = [@"{B0123456789" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendBarcodeDataWithAlignment:otherDataCode128 symbology:SCBBarcodeSymbologyCode128 width:SCBBarcodeWidthMode1 height:40 hri:YES position:SCBAlignmentPositionCenter]; [builder appendUnitFeed:32]; [builder appendBarcodeDataWithAlignment:otherDataCode128 symbology:SCBBarcodeSymbologyCode128 width:SCBBarcodeWidthMode1 height:40 hri:YES position:SCBAlignmentPositionRight]; [builder appendUnitFeed:32]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.49. appendPdf417Data¶
PDF417印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendPdf417Data:(NSData *)otherData line:(NSInteger)line column:(NSInteger)column level:(SCBPdf417Level)level module:(NSInteger)module aspect:(NSInteger)aspect; - (void)appendPdf417Bytes:(const void *)bytes length:(NSUInteger)length line:(NSInteger)line column:(NSInteger)column level:(SCBPdf417Level)level module:(NSInteger)module aspect:(NSInteger)aspect;
引数
名称 説明 型 otherDatabytesPDF417データ NSData *const void *length データ長 NSUInteger line ライン数 NSInteger column カラム数 NSInteger level PDF417 ECC(セキュリティレベル) SCBPdf417Level module モジュールX方向サイズ NSInteger aspect モジュールアスペクト比 NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World." dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendPdf417Data:otherData line:0 column:1 level:SCBPdf417LevelECC0 module:2 aspect:2]; [builder appendUnitFeed:32]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.50. appendPdf417DataWithAbsolutePosition¶
絶対位置指定PDF417印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendPdf417DataWithAbsolutePosition:(NSData *)otherData line:(NSInteger)line column:(NSInteger)column level:(SCBPdf417Level)level module:(NSInteger)module aspect:(NSInteger)aspect position:(NSInteger)position; - (void)appendPdf417BytesWithAbsolutePosition:(const void *)bytes length:(NSUInteger)length line:(NSInteger)line column:(NSInteger)column level:(SCBPdf417Level)level module:(NSInteger)module aspect:(NSInteger)aspect position:(NSInteger)position;
引数
名称 説明 型 position 絶対位置(ドット数単位) NSInteger otherDatabytesPDF417データ NSData *const void *length データ長 NSUInteger line ライン数 NSInteger column カラム数 NSInteger level PDF417 ECC(セキュリティレベル) SCBPdf417Level module モジュールX方向サイズ NSInteger aspect モジュールアスペクト比 NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World." dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendPdf417DataWithAbsolutePosition:otherData line:0 column:1 level:SCBPdf417LevelECC0 module:2 aspect:2 position:40]; [builder appendUnitFeed:32]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.51. appendPdf417DataWithAlignment¶
位置揃えPDF417印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendPdf417DataWithAlignment:(NSData *)otherData line:(NSInteger)line column:(NSInteger)column level:(SCBPdf417Level)level module:(NSInteger)module aspect:(NSInteger)aspect position:(SCBAlignmentPosition)position; - (void)appendPdf417BytesWithAlignment:(const void *)bytes length:(NSUInteger)length line:(NSInteger)line column:(NSInteger)column level:(SCBPdf417Level)level module:(NSInteger)module aspect:(NSInteger)aspect position:(SCBAlignmentPosition)position;
引数
名称 説明 型 position 位置揃え指定 SCBAlignmentPosition otherDatabytesPDF417データ NSData *const void *length データ長 NSUInteger line ライン数 NSInteger column カラム数 NSInteger level PDF417 ECC(セキュリティレベル) SCBPdf417Level module モジュールX方向サイズ NSInteger aspect モジュールアスペクト比 NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World." dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendPdf417DataWithAlignment:otherData line:0 column:1 level:SCBPdf417LevelECC0 module:2 aspect:2 position:SCBAlignmentPositionCenter]; [builder appendUnitFeed:32]; [builder appendPdf417DataWithAlignment:otherData line:0 column:1 level:SCBPdf417LevelECC0 module:2 aspect:2 position:SCBAlignmentPositionRight]; [builder appendUnitFeed:32]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.52. appendQrCodeData¶
QRコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendQrCodeData:(NSData *)otherData model:(SCBQrCodeModel)model level:(SCBQrCodeLevel)level cell:(NSInteger)cell; - (void)appendQrCodeBytes:(const void *)bytes length:(NSUInteger)length model:(SCBQrCodeModel)model level:(SCBQrCodeLevel)level cell:(NSInteger)cell;
引数
名称 説明 型 otherDatabytesQRコードデータ NSData *const void *length データ長 NSUInteger model QRコードモデル SCBQrCodeModel level QRコード誤り訂正レベル SCBQrCodeLevel cell QRコードセルサイズ NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World." dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendQrCodeData:otherData model:SCBQrCodeModelNo2 level:SCBQrCodeLevelL cell:4]; [builder appendUnitFeed:32]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.53. appendQrCodeDataWithAbsolutePosition¶
絶対位置指定QRコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendQrCodeDataWithAbsolutePosition:(NSData *)otherData model:(SCBQrCodeModel)model level:(SCBQrCodeLevel)level cell:(NSInteger)cell position:(NSInteger)position; - (void)appendQrCodeBytesWithAbsolutePosition:(const void *)bytes length:(NSUInteger)length model:(SCBQrCodeModel)model level:(SCBQrCodeLevel)level cell:(NSInteger)cell position:(NSInteger)position;
引数
名称 説明 型 position 絶対位置(ドット数単位) NSInteger otherDatabytesQRコードデータ NSData *const void *length データ長 NSUInteger model QRコードモデル SCBQrCodeModel level QRコード誤り訂正レベル SCBQrCodeLevel cell QRコードセルサイズ NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World." dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendQrCodeDataWithAbsolutePosition:otherData model:SCBQrCodeModelNo2 level:SCBQrCodeLevelL cell:4 position:40]; [builder appendUnitFeed:32]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.54. appendQrCodeDataWithAlignment¶
位置揃えQRコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendQrCodeDataWithAlignment:(NSData *)otherData model:(SCBQrCodeModel)model level:(SCBQrCodeLevel)level cell:(NSInteger)cell position:(SCBAlignmentPosition)position; - (void)appendQrCodeBytesWithAlignment:(const void *)bytes length:(NSUInteger)length model:(SCBQrCodeModel)model level:(SCBQrCodeLevel)level cell:(NSInteger)cell position:(SCBAlignmentPosition)position;
引数
名称 説明 型 position 位置揃え指定 SCBAlignmentPosition otherDatabytesQRコードデータ NSData *const void *length データ長 NSUInteger model QRコードモデル SCBQrCodeModel level QRコード誤り訂正レベル SCBQrCodeLevel cell QRコードセルサイズ NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World." dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendQrCodeDataWithAlignment:otherData model:SCBQrCodeModelNo2 level:SCBQrCodeLevelL cell:4 position:SCBAlignmentPositionCenter]; [builder appendUnitFeed:32]; [builder appendQrCodeDataWithAlignment:otherData model:SCBQrCodeModelNo2 level:SCBQrCodeLevelL cell:4 position:SCBAlignmentPositionRight]; [builder appendUnitFeed:32]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.m / 各コマンド仕様書を参照ください。
4.2.55. appendBitmap¶
ビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendBitmap:(UIImage *)image diffusion:(BOOL)diffusion width:(NSInteger)width bothScale:(BOOL)bothScale rotation:(SCBBitmapConverterRotation)rotation; - (void)appendBitmap:(UIImage *)image diffusion:(BOOL)diffusion rotation:(SCBBitmapConverterRotation)rotation; - (void)appendBitmap:(UIImage *)image diffusion:(BOOL)diffusion width:(NSInteger)width bothScale:(BOOL)bothScale; - (void)appendBitmap:(UIImage *)image diffusion:(BOOL)diffusion;
引数
名称 説明 型 bitmap 元となるビットマップオブジェクト UIImage * diffusion 誤差拡散YES ... 誤差拡散を行うNO ... 誤差拡散を行わないBOOL width 変換後のビットマップ幅(ドット数単位) NSInteger bothScale widthプロパティによる変換率に合わせた高さ変換YES ... 高さ変換を行うNO ... 高さ変換を行わないBOOL rotation 変換後の回転 SCBBitmapConverterRotation 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation width:(NSInteger)width { UIImage *starLogoImage = [UIImage imageNamed:@"StarLogoImage"]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:[@"\n*Normal*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmap:starLogoImage diffusion:YES]; [builder appendData:[@"\n*width:Full, bothScale:YES*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmap:starLogoImage diffusion:YES width:width bothScale:YES]; [builder appendData:[@"\n*width:Full, bothScale:NO*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmap:starLogoImage diffusion:YES width:width bothScale:NO]; [builder appendData:[@"\n*Rotate180*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmap:starLogoImage diffusion:YES rotation:SCBBitmapConverterRotationRotate180]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.56. appendBitmapWithAbsolutePosition¶
絶対位置指定ビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendBitmapWithAbsolutePosition:(UIImage *)image diffusion:(BOOL)diffusion width:(NSInteger)width bothScale:(BOOL)bothScale rotation:(SCBBitmapConverterRotation)rotation position:(NSInteger)position; - (void)appendBitmapWithAbsolutePosition:(UIImage *)image diffusion:(BOOL)diffusion rotation:(SCBBitmapConverterRotation)rotation position:(NSInteger)position; - (void)appendBitmapWithAbsolutePosition:(UIImage *)image diffusion:(BOOL)diffusion width:(NSInteger)width bothScale:(BOOL)bothScale position:(NSInteger)position; - (void)appendBitmapWithAbsolutePosition:(UIImage *)image diffusion:(BOOL)diffusion position:(NSInteger)position;
引数
名称 説明 型 position 絶対位置(ドット数単位) NSInteger bitmap 元となるビットマップオブジェクト UIImage * diffusion 誤差拡散YES ... 誤差拡散を行うNO ... 誤差拡散を行わないBOOL width 変換後のビットマップ幅(ドット数単位) NSInteger bothScale widthプロパティによる変換率に合わせた高さ変換YES ... 高さ変換を行うNO ... 高さ変換を行わないBOOL rotation 変換後の回転 SCBBitmapConverterRotation 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation width:(NSInteger)width { UIImage *starLogoImage = [UIImage imageNamed:@"StarLogoImage"]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:[@"\n*Normal, AbsolutePosition:40*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmapWithAbsolutePosition:starLogoImage diffusion:YES position:40]; [builder appendData:[@"\n*width:Full, bothScale:YES, AbsolutePosition:40*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmap:starLogoImage diffusion:YES width:width bothScale:YES position:40]; [builder appendData:[@"\n*width:Full, bothScale:NO, AbsolutePosition:40*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmap:starLogoImage diffusion:YES width:width bothScale:NO position:40]; [builder appendData:[@"\n*Rotate180, AbsolutePosition:40*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmapWithAbsolutePosition:starLogoImage diffusion:YES rotation:SCBBitmapConverterRotationRotate180 position:40]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.57. appendBitmapWithAlignment¶
位置揃えビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendBitmapWithAlignment:(UIImage *)image diffusion:(BOOL)diffusion width:(NSInteger)width bothScale:(BOOL)bothScale rotation:(SCBBitmapConverterRotation)rotation position:(SCBAlignmentPosition)position; - (void)appendBitmapWithAlignment:(UIImage *)image diffusion:(BOOL)diffusion rotation:(SCBBitmapConverterRotation)rotation position:(SCBAlignmentPosition)position; - (void)appendBitmapWithAlignment:(UIImage *)image diffusion:(BOOL)diffusion width:(NSInteger)width bothScale:(BOOL)bothScale position:(SCBAlignmentPosition)position; - (void)appendBitmapWithAlignment:(UIImage *)image diffusion:(BOOL)diffusion position:(SCBAlignmentPosition)position;
引数
名称 説明 型 position 位置揃え指定 SCBAlignmentPosition bitmap 元となるビットマップオブジェクト UIImage * diffusion 誤差拡散YES ... 誤差拡散を行うNO ... 誤差拡散を行わないBOOL width 変換後のビットマップ幅(ドット数単位) NSInteger bothScale widthプロパティによる変換率に合わせた高さ変換YES ... 高さ変換を行うNO ... 高さ変換を行わないBOOL rotation 変換後の回転 SCBBitmapConverterRotation 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation width:(NSInteger)width { UIImage *starLogoImage = [UIImage imageNamed:@"StarLogoImage"]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:[@"\n*Normal, Alignment:Center*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmapWithAlignment:starLogoImage diffusion:YES position:SCBAlignmentPositionCenter]; [builder appendData:[@"\n*width:Full, bothScale:YES, Alignment:Center*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmapWithAlignment:starLogoImage diffusion:YES width:width bothScale:YES position:SCBAlignmentPositionCenter]; [builder appendData:[@"\n*width:Full, bothScale:NO, Alignment:Center*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmapWithAlignment:starLogoImage diffusion:YES width:width bothScale:NO position:SCBAlignmentPositionCenter]; [builder appendData:[@"\n*Rotate180, Alignment:Center*\n" dataUsingEncoding:NSASCIIStringEncoding]]; [builder appendBitmapWithAlignment:starLogoImage diffusion:YES rotation:SCBBitmapConverterRotationRotate180 position:SCBAlignmentPositionCenter]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.58. appendBlackMark¶
added in version 1.6.0
ブラックマークコマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendBlackMark:(SCBBlackMarkType)type;
引数
名称 説明 型 type ブラックマーク SCBBlackMarkType 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendBlackMark:SCBBlackMarkTypeValid]; [builder appendData:otherData]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; // [builder appendBlackMark:SCBBlackMarkTypeInvalid]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.59. beginPageMode¶
added in version 1.6.0
ページモード開始コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)beginPageMode:(CGRect)rect rotation:(SCBBitmapConverterRotation)rotation;
引数
名称 説明 型 rect 位置とサイズ(ドット数単位) CGRect rotation 印刷方向 SCBBitmapConverterRotation 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation width:(NSInteger)width { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; int height = 30 * 8; // 30mm!!! CGRect rect; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:[@"\n*Rotate180 Text*\n" dataUsingEncoding:NSASCIIStringEncoding]]; rect = CGRectMake(0, 0, width, height); [builder beginPageMode:rect rotation:SCBBitmapConverterRotationRotate180]; [builder appendPageModeVerticalAbsolutePosition:height / 2]; [builder appendDataWithAbsolutePosition:otherData position:width / 2]; [builder endPageMode]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.60. endPageMode¶
added in version 1.6.0
ページモード終了コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)endPageMode;
引数
なし
戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation width:(NSInteger)width { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; int height = 30 * 8; // 30mm!!! CGRect rect; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:[@"\n*Rotate180 Text*\n" dataUsingEncoding:NSASCIIStringEncoding]]; rect = CGRectMake(0, 0, width, height); [builder beginPageMode:rect rotation:SCBBitmapConverterRotationRotate180]; [builder appendPageModeVerticalAbsolutePosition:height / 2]; [builder appendDataWithAbsolutePosition:otherData position:width / 2]; [builder endPageMode]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.61. appendPageModeVerticalAbsolutePosition¶
added in version 1.6.0
ページモードの縦方向絶対位置指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendPageModeVerticalAbsolutePosition:(NSInteger)position;
引数
名称 説明 型 position 縦方向の絶対位置(ドット数単位) NSInteger 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation width:(NSInteger)width { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; int height = 30 * 8; // 30mm!!! CGRect rect; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:[@"\n*Rotate180 Text*\n" dataUsingEncoding:NSASCIIStringEncoding]]; rect = CGRectMake(0, 0, width, height); [builder beginPageMode:rect rotation:SCBBitmapConverterRotationRotate180]; [builder appendPageModeVerticalAbsolutePosition:height / 2]; [builder appendDataWithAbsolutePosition:otherData position:width / 2]; [builder endPageMode]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.62. appendPageModeRotation¶
added in version 1.6.0
ページモード印刷方向コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendPageModeRotation:(SCBBitmapConverterRotation)rotation;
引数
名称 説明 型 rotation 印刷方向 SCBBitmapConverterRotation 戻り値
なし
実装例
+ (NSData *)createData:(StarIoExtEmulation)emulation width:(NSInteger)width { NSData *otherData = [@"Hello World.\n" dataUsingEncoding:NSASCIIStringEncoding]; int height = 30 * 8; // 30mm!!! CGRect rect; ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendData:[@"\n*Mixed Text*\n" dataUsingEncoding:NSASCIIStringEncoding]]; rect = CGRectMake(0, 0, width, height); [builder beginPageMode:rect rotation:SCBBitmapConverterRotationNormal]; [builder appendPageModeVerticalAbsolutePosition:height / 2]; [builder appendDataWithAbsolutePosition:otherData position:width / 2]; [builder appendPageModeRotation:SCBBitmapConverterRotationRotate180]; [builder appendPageModeVerticalAbsolutePosition:height / 2]; [builder appendDataWithAbsolutePosition:otherData position:width / 2]; [builder endPageMode]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
ApiFunctions.mを参照ください。
4.2.63. appendPrintableArea¶
added in version 1.9.0
印字領域設定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendPrintableArea:(SCBPrintableAreaType)type;
引数
名称 説明 型 type 印字領域タイプ SCBPrintableAreaType 戻り値
なし
単位:mm
指定するPrintableAreaTypeと設定される印字領域の対応は以下のとおりです。
モデル/エミュレーション |
mC-Print2 | mC-Print3 | mPOP | FVP10 | TSP100IV | TSP100IIIW | TSP100IIIBI | TSP100IIIU | TSP100ECO | TSP100U | TSP100GT | TSP100LAN | TSP650II | TSP650IISK | TSP700II | TSP800II | SM-S210i | SM-S220i | SM-S230i | SM-T300i/T300 | SM-T400i | BSC10 | SM-L200 | SM-L300 | SP700 | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StarPRNT | StarPRNT | StarPRNT | StarLine | StarPRNT | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarLine | StarLine | StarLine | StarLine | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | EscPos | StarPRNT | StarPRNT | StarDotImpact | |
SCBPrintableAreaTypeStandard |
48 | 72[1] | 48 | 72[1] | 72[1] | 72[1] | 72[1] | 72[1] | 72[1] | 72[1] | 72[1] | 72[1] | 72[1] | 72[1] | 72[1] | 104[2] | - | - | - | - | - | - | - | - | - | - | 64[1][3] | - | 72[1] | 63 |
SCBPrintableAreaTypeType1 |
54 | - | 54 | 52.5 | 51 | 51 | 51 | 51 | 51 | 51 | 51 | 51 | - | 34.5 | 52.5 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | 48 |
SCBPrintableAreaTypeType2 |
- | 48 | - | - | 48 | - | - | - | - | - | - | - | - | 32 | 80[1] | 72 | - | - | - | - | - | - | - | - | - | - | - | - | - | 60 |
SCBPrintableAreaTypeType3 |
50.8 | 50.8 | 50.8 | 50.8 | 50.8 | - | - | - | - | - | - | - | 50.8 | 50.8 | 50.8 | - | - | - | - | - | - | - | - | - | - | - | 45[3] | - | 50.8 | 45 |
SCBPrintableAreaTypeType4 |
- | - | - | 52 | - | - | - | - | - | - | - | - | - | - | 52 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | 57 |
[1] | 2インチ紙を使用時、3インチ幅の印字領域設定を行わないでください |
[2] | 3インチ紙を使用時、4インチ幅の印字領域設定を行わないでください |
[3] | メモリスイッチの印字桁数を”最大桁数”に設定することで、Standardの場合72mm、Type3の場合50.8mmに設定されます。(メモリスイッチ4のビット4を1に設定) |
実装例
+ (NSData *)createPrintableAreaDataWithEmulation:(StarIoExtEmulation)emulation type:(SCBPrintableAreaType)type { ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendPrintableArea:type]; switch (type) { case SCBPrintableAreaTypeStandard: [builder appendData:[@"*Standard*\n" dataUsingEncoding:NSASCIIStringEncoding]]; break; case SCBPrintableAreaTypeType1: [builder appendData:[@"*Type1*\n" dataUsingEncoding:NSASCIIStringEncoding]]; break; case SCBPrintableAreaTypeType2: [builder appendData:[@"*Type2*\n" dataUsingEncoding:NSASCIIStringEncoding]]; break; case SCBPrintableAreaTypeType3: [builder appendData:[@"*Type3*\n" dataUsingEncoding:NSASCIIStringEncoding]]; break; case SCBPrintableAreaTypeType4: [builder appendData:[@"*Type4*\n" dataUsingEncoding:NSASCIIStringEncoding]]; break; } UIImage *image = [UIImage imageNamed:@"PrintableAreaImage.png"]; [builder appendBitmap:image diffusion:true]; NSData *data1 = [@"123456789" dataUsingEncoding:NSASCIIStringEncoding]; NSData *data2 = [@"0" dataUsingEncoding:NSASCIIStringEncoding]; for (int i = 0; i < 8; i++) { [builder appendData:data1]; [builder appendDataWithInvert:data2]; } [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return builder.commands; }
ApiFunctions.mを参照ください。
4.2.64. appendCjkUnifiedIdeographFont¶
added in version 1.13.0
UTF-8におけるCJK統合漢字のフォント設定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendCjkUnifiedIdeographFont:(NSArray<NSNumber *> *)fonts;
引数
名称 説明 型 font CJK統合漢字のフォント2つ以上のフォントを指定した場合、先に指定したフォントから優先して印字されます。引数に何も指定しない場合、CJK統合漢字のフォント設定をメモリスイッチ設定に戻します。SCBCjkUnifiedIdeographFont 戻り値
なし
実装例
- (void)append3inchTextReceiptData:(ISCBBuilder *)builder utf8:(BOOL)utf8 { NSStringEncoding encoding = NSUTF8StringEncoding; // This function is supported by TSP650II(JP2/TW models only) with F/W version 4.0 or later and mC-Print 2/3. // Switch Kanji/Hangul font by specifying the font for Unicode CJK Unified Ideographs before each word. [builder appendCodePage:SCBCodePageTypeUTF8]; [builder appendCharacterSpace:0]; [builder appendAlignment:SCBAlignmentPositionCenter]; [builder appendData:[@"2017 / 5 / 15 AM 10:00\n" dataUsingEncoding:encoding]]; [builder appendMultiple:2 height:2]; [builder appendCjkUnifiedIdeographFont:@[@(SCBCjkUnifiedIdeographFontJapanese)]]; [builder appendData:[@"受付票 " dataUsingEncoding:encoding]]; [builder appendCjkUnifiedIdeographFont:@[@(SCBCjkUnifiedIdeographFontTraditionalChinese)]]; [builder appendData:[@"排號單\n" dataUsingEncoding:encoding]]; [builder appendCjkUnifiedIdeographFont:@[@(SCBCjkUnifiedIdeographFontSimplifiedChinese)]]; [builder appendData:[@"排号单 " dataUsingEncoding:encoding]]; [builder appendCjkUnifiedIdeographFont:@[@(SCBCjkUnifiedIdeographFontHangul)]]; [builder appendData:[@"접수표\n\n" dataUsingEncoding:encoding]]; [builder appendMultiple:1 height:1]; [builder appendCjkUnifiedIdeographFont:@[]]; [builder appendDataWithMultiple:[@"1\n" dataUsingEncoding:encoding] width:6 height:6]; [builder appendData:[@"------------------------------------------\n" dataUsingEncoding:encoding]]; [builder appendCjkUnifiedIdeographFont:@[@(SCBCjkUnifiedIdeographFontJapanese)]]; [builder appendData:[@"ご本人がお持ちください。\n" dataUsingEncoding:encoding]]; [builder appendData:[@"※紛失しないようにご注意ください。\n" dataUsingEncoding:encoding]]; }
Utf8MultiLanguageReceiptsImpl.m を参照ください。
4.2.65. appendHoldPrint¶
added in version 1.15.0
プリンターファームウェアによる用紙保持制御の指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendHoldPrint:(SCBHoldPrintType)type;
引数
名称 説明 型 type 用紙保持制御 SCBHoldPrintType 戻り値
なし
注釈
用紙保持制御の有効化
以下の設定により、用紙保持制御(用紙が抜き取られるまで beginCheckedBlock メソッドがブロックされる)が有効化されます。 実装例も参照ください。
- 本メソッドで生成したコマンドにより、プリンターファームウェアによる用紙保持制御を無効に設定
- appendPaperPresentStatus メソッドで生成したコマンドにより、用紙保持ステータスを有効に設定
4.2.66. appendPaperPresentStatus¶
added in version 1.15.0
用紙保持ステータス指定コマンドを生成し、コマンドバッファに追加します。
宣言
- (void)appendPaperPresentStatus:(SCBPaperPresentStatusType)type;
引数
名称 説明 型 type 用紙保持ステータス SCBPaperPresentStatusType 戻り値
なし