4.2. ICommandBuilder
プリンタ制御用コマンドを生成する機能を提供します。
列挙体
名称
説明
初期化指定定数
フォントスタイル指定定数
コードページ指定定数
国際文字指定定数
ロゴサイズ指定定数
位置揃え指定定数
用紙カット指定定数
キャッシュドロアーチャネル指定定数
サウンド/ブザーチャネル指定定数
バーコードシンボル指定定数
バーコード幅指定定数
PDF417 ECC(セキュリティレベル)指定定数
QRコードモデル指定定数
QRコード誤り訂正レベル指定定数
ビットマップ回転指定定数
ブラックマーク検出指定定数
ダイカットラベル紙等のギャップ検出指定定数
印字領域タイプ指定定数
CJK統合漢字のフォント指定定数
用紙保持制御の指定定数
用紙保持ステータス指定定数
プロパティ
名称
説明
生成、追加されたコマンド列です。
メソッド
名称
説明
ドキュメント開始コマンドを生成し、コマンドバッファに追加します。
ドキュメント終了コマンドを生成し、コマンドバッファに追加します。
初期化コマンドを生成し、コマンドバッファに追加します。
データ(テキストやコマンド)を、コマンドバッファに追加します。
生のデータ(テキストやコマンド)を、コマンドバッファに追加します。
フォントスタイル指定コマンドを生成し、コマンドバッファに追加します。
コードページ指定コマンドを生成し、コマンドバッファに追加します。
国際文字指定コマンドを生成し、コマンドバッファに追加します。
行単位の用紙送りコマンドを生成し、コマンドバッファに追加します。
1ドットライン単位の用紙送りコマンドを生成し、コマンドバッファに追加します。
文字間スペース設定コマンドを生成し、コマンドバッファに追加します。
行間スペース設定コマンドを生成し、コマンドバッファに追加します。
トップマージン設定コマンドを生成し、コマンドバッファに追加します。
強調指定コマンドを生成し、コマンドバッファに追加します。
白黒反転指定コマンドを生成し、コマンドバッファに追加します。
拡大指定コマンドを生成し、コマンドバッファに追加します。
アンダーライン指定コマンドを生成し、コマンドバッファに追加します。
ロゴ印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定コマンドを生成し、コマンドバッファに追加します。
位置揃え指定コマンドを生成し、コマンドバッファに追加します。
クリアコマンドを生成し、コマンドバッファに追加します。
用紙カットコマンドを生成し、コマンドバッファに追加します。
キャッシュドロアー駆動コマンドを生成し、コマンドバッファに追加します。
サウンド/ブザー駆動コマンドを生成し、コマンドバッファに追加します。
バーコード印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定バーコード印刷コマンドを生成し、コマンドバッファに追加します。
位置揃えバーコード印刷コマンドを生成し、コマンドバッファに追加します。
PDF417印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定PDF417印刷コマンドを生成し、コマンドバッファに追加します。
位置揃えPDF417印刷コマンドを生成し、コマンドバッファに追加します。
QRコード印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定QRコード印刷コマンドを生成し、コマンドバッファに追加します。
位置揃えQRコード印刷コマンドを生成し、コマンドバッファに追加します。
ビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
絶対位置指定ビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
位置揃えビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
ブラックマーク検出コマンドを生成し、コマンドバッファに追加します。
ダイカットラベル紙等のギャップ検出指定コマンドを生成し、コマンドバッファに追加します。
ページモード開始コマンドを生成し、コマンドバッファに追加します。
ページモード終了コマンドを生成し、コマンドバッファに追加します。
ページモードの縦方向絶対位置指定コマンドを生成し、コマンドバッファに追加します。
ページモード印刷方向コマンドを生成し、コマンドバッファに追加します。
印字領域設定コマンドを生成し、コマンドバッファに追加します。
UTF-8におけるCJK統合漢字のフォント設定コマンドを生成し、コマンドバッファに追加します。
プリンターファームウェアによる用紙保持制御の指定コマンドを生成し、コマンドバッファに追加します。
用紙保持ステータス指定コマンドを生成し、コマンドバッファに追加します。
各モデルにおいて機能するメソッドは以下のとおりです。
モデル/エミュレーション |
mC-Print2 | mC-Print3 | mC-Label3 | mPOP | FVP10 | TSP100IV | TSP100IV SK | TSP100IIIW | TSP100IIIBI | TSP100IIIU | TSP100IIU+ | TSP100ECO | TSP100U | TSP100GT | TSP100LAN | TSP650II | TSP650IISK | TSP700II | TSP800II | SM-S210i | SM-S220i | SM-S230i | SM-T300i/T300 | SM-T400i | BSC10II | BSC10 | SM-L200 | SM-L300 | SP700 | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StarPRNT | StarPRNT | StarPRNT | StarPRNT | StarLine | StarPRNT | StarPRNT | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarLine | StarLine | StarLine | StarLine | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPos | StarPRNT | StarPRNT | StarDotImpact | |
BeginDocument |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
EndDocument |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
AppendInitialization |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Append |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
AppendRaw |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
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 |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | - | - | ✔ | ✔ | - | - | ✔ |
AppendBarcode [6] |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
AppendBarcodeWithAbsolutePosition [6] |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
AppendBarcodeWithAlignment [6] |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔ | ✔ | ✔ | - |
AppendPdf417 |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
AppendPdf417WithAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
AppendPdf417WithAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔ | ✔ | ✔ | - |
AppendQrCode |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
AppendQrCodeWithAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
AppendQrCodeWithAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[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] | ✔ |
AppendLabel |
- | - | ✔ | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
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.6.0 以降が必要。 |
[11] | プリンター側でブラックマーク設定を有効にする必要有り。設定方法はハードウェアマニュアル参照のこと。 |
[12] | JP2/TWモデルのファームウェアバージョン4.0以降が必要。 |
[13] | ファームウェアバージョン7.1以降が必要。 |
4.2.1. InitializationType
初期化指定定数です。
宣言
public enum InitializationType { Command }
定数
名称
説明
Command
コマンド初期化
4.2.2. FontStyleType
フォントスタイル指定定数です。
宣言
public enum FontStyleType { A, B }
定数
名称
説明
A
フォントA(12 x 24ドット)/ 7 x 9フォント(ハーフドット)
B
フォントB( 9 x 24ドット)/ 5 x 9フォント(2P-1)
4.2.3. CodePageType
コードページ指定定数です。
宣言
public enum CodePageType { CP437, CP737, CP772, CP774, CP851, CP852, CP855, CP857, CP858, CP860, CP861, CP862, CP863, CP864, CP865, CP866, CP869, CP874, CP928, CP932, CP998, CP999, CP1001, CP1250, CP1251, CP1252, CP2001, CP3001, CP3002, CP3011, CP3012, CP3021, CP3041, CP3840, CP3841, CP3843, CP3844, CP3845, CP3846, CP3847, CP3848, UTF8, Blank }
定数
名称
説明
CP437
CodePage 437 (USA, Std. Europe)
CP737
Codepage 737 (Greek)
CP772
Codepage 772 (Lithuanian)
CP774
Codepage 774 (Lithuanian)
CP851
Codepage 851 (Greek)
CP852
Codepage 852 (Latin-2)
CP855
Codepage 855 (Cyrillic Bulgarian)
CP857
Codepage 857 (Turkey)
CP858
Codepage 858 (Multilingual)
CP860
Codepage 860 (Portuguese)
CP861
Codepage 861 (Icelandic)
CP862
Codepage 862 (Israel (Hebrew))
CP863
Codepage 863 (Canadian French)
CP864
Codepage 864 (Arabic)
CP865
Codepage 865 (Nordic)
CP866
Codepage 866 (Cyrillic Russian)
CP869
Codepage 869 (Greek)
CP874
Codepage 874 (Thai)
CP928
Codepage 928 (Greek)
CP932
Katakana
CP998
Normal
CP999
Codepage 1252 (Windows Latin-1)
CP1001
Codepage 1001 (Arabic)
CP1250
Codepage 1250 (Windows Latin-2)
CP1251
Codepage 1251 (Windows Cyrillic)
CP1252
Codepage 1252 (Windows Latin-1)
CP2001
Codepage 2001 (Lithuanian-KBL)
CP3001
Codepage 3001 (Estonian-1)
CP3002
Codepage 3002 (Estonian-2)
CP3011
Codepage 3011 (Latvian-1)
CP3012
Codepage 3012 (Latvian-2)
CP3021
Codepage 3021 (Bulgarian)
CP3041
Codepage 3041 (Maltese)
CP3840
Codepage 3840 (IBM-Russian)
CP3841
Codepage 3841 (Gost)
CP3843
Codepage 3843 (Polish)
CP3844
Codepage 3844 (CS2)
CP3845
Codepage 3845 (Hungarian)
CP3846
Codepage 3846 (Turkish)
CP3847
Codepage 3847 (Brazil-ABNT)
CP3848
Codepage 3848 (Brazil-ABICOMP)
UTF8
UTF-8
Blank
User Setting Blank Code Page
4.2.4. InternationalType
国際文字指定定数です。
宣言
public enum InternationalType { USA, France, Germany, UK, Denmark, Sweden, Italy, Spain, Japan, Norway, Denmark2, Spain2, LatinAmerica, Korea, Ireland, India, Legal }
定数
名称
説明
USA
アメリカ
France
フランス
Germany
ドイツ
UK
イギリス
Denmark
デンマーク
Sweden
スウェーデン
Italy
イタリア
Spain
スペイン
Japan
日本
Norway
ノルウェー
Denmark2
デンマーク II
Spain2
スペイン II
LatinAmerica
ラテンアメリカ
Korea
韓国
Ireland
アイルランド
India
インド [1]
Legal
Legal
[1] BSC10IIのみ対応
4.2.5. LogoSize
ロゴサイズ指定定数です。
宣言
public enum LogoSize { Normal, DoubleWidth, DoubleHeight, DoubleWidthDoubleHeight }
定数
名称
説明
Normal
ノーマルモード
DoubleWidth
横2倍モード
DoubleHeight
縦2倍モード
DoubleWidthDoubleHeight
縦2倍、横2倍モード
4.2.6. AlignmentPosition
位置揃え指定定数です。
宣言
public enum AlignmentPosition { Left, Center, Right }
定数
名称
説明
Left
左揃え
Center
中心揃え
Right
右揃え
4.2.7. CutPaperAction
用紙カット指定定数です。
宣言
public enum CutPaperAction { FullCut, PartialCut, FullCutWithFeed, PartialCutWithFeed, TearOff }
定数
名称
説明
FullCut
フルカット
PartialCut
パーシャルカット
FullCutWithFeed
用紙送り付きフルカット
PartialCutWithFeed
用紙送り付きパーシャルカット
TearOff
用紙送りのみ、カットなし
4.2.8. PeripheralChannel
キャッシュドロアーチャネル指定定数です。
宣言
public enum PeripheralChannel { No1, No2 }
定数
名称
説明
No1
チャネル1
No2
チャネル2
4.2.9. SoundChannel
サウンド/ブザーチャネル指定定数です。
宣言
public enum SoundChannel { No1, No2 }
定数
名称
説明
No1
チャネル1
No2
チャネル2
4.2.10. BarcodeSymbology
バーコードシンボル指定定数です。
宣言
public enum BarcodeSymbology { UPCE, UPCA, JAN8, JAN13, Code39, ITF, Code128, Code93, NW7 }
定数
名称
説明
UPCE
UPC-E
UPCA
UPC-A
JAN8
JAN/EAN8
JAN13
JAN/EAN13
Code39
Code39
ITF
ITF
Code128
Code93
Code93
NW7
NW7
4.2.11. BarcodeWidth
バーコード幅指定定数です。
ExtModeを指定することで、コマンド仕様に準拠したバーコードモードが指定されます。
宣言
public enum BarcodeWidth { Mode1, Mode2, Mode3, Mode4, Mode5, Mode6, Mode7, Mode8, Mode9, ExtMode1, ExtMode2, ExtMode3, ExtMode4, ExtMode5, ExtMode6, ExtMode7, ExtMode8, ExtMode9 }
定数
名称
説明
ライブラリバージョン
Mode1
モード1
1.0.0+ Mode2
モード2
1.0.0+ Mode3
モード3
1.0.0+ Mode4
モード4
1.0.0+ Mode5
モード5
1.0.0+ Mode6
モード6
1.0.0+ Mode7
モード7
1.0.0+ Mode8
モード8
1.0.0+ Mode9
モード9
1.0.0+ ExtMode1
Extモード1
1.5.0+ ExtMode2
Extモード2
1.5.0+ ExtMode3
Extモード3
1.5.0+ ExtMode4
Extモード4
1.5.0+ ExtMode5
Extモード5
1.5.0+ ExtMode6
Extモード6
1.5.0+ ExtMode7
Extモード7
1.5.0+ ExtMode8
Extモード8
1.5.0+ ExtMode9
Extモード9
1.5.0+
4.2.12. Pdf417Level
PDF417 ECC(セキュリティレベル)指定定数です。
宣言
public enum Pdf417Level { ECC0, ECC1, ECC2, ECC3, ECC4, ECC5, ECC6, ECC7, ECC8 }
定数
名称
説明
ECC0
セキュリティレベル0
ECC1
セキュリティレベル1
ECC2
セキュリティレベル2
ECC3
セキュリティレベル3
ECC4
セキュリティレベル4
ECC5
セキュリティレベル5
ECC6
セキュリティレベル6
ECC7
セキュリティレベル7
ECC8
セキュリティレベル8
4.2.13. QrCodeModel
QRコードモデル指定定数です。
宣言
public enum QrCodeModel { No1, No2 }
定数
名称
説明
No1
モデル1
No2
モデル2
4.2.14. QrCodeLevel
QR コード誤り訂正レベル指定定数です。
宣言
public enum QrCodeLevel { L, M, Q, H }
定数
名称
説明
L
誤り訂正レベルL
M
誤り訂正レベルM
Q
誤り訂正レベルQ
H
誤り訂正レベルH
4.2.15. BitmapConverterRotation
ビットマップ回転指定定数です。
宣言
public enum BitmapConverterRotation { Normal, Right90, Left90, Rotate180 }
定数
名称
説明
Normal
回転なし
Right90
右90度 回転
Left90
左90度 回転
Rotate180
180度 回転
4.2.16. BlackMarkType
ブラックマーク検出指定定数です。
宣言
public enum BlackMarkType { Invalid, Valid, ValidWithDetection }
定数
名称
説明
Invalid
ブラックマーク検出無効
Valid
ブラックマーク検出有効
ValidWithDetection
ブラックマーク検出有効 + 電源投入時のブラックマーク検出動作有効
4.2.17. LabelType
added in version 1.8.0
ダイカットラベル紙等のギャップ検出指定定数です。
宣言
public enum LabelType { Invalid, Valid, ValidWithDetection }
定数
名称
説明
Invalid
ギャップ検出無効
Valid
ギャップ検出有効
ValidWithDetection
ギャップ検出有効 + 電源投入時のギャップ検出動作有効
4.2.18. PrintableAreaType
added in version 1.2.0
印字領域タイプ指定定数です。
宣言
public enum PrintableAreaType { Standard, Type1, Type2, Type3, Type4 }
定数
名称
説明
Standard
標準タイプ
Type1
タイプ1
Type2
タイプ2
Type3
タイプ3
Type4
タイプ4
4.2.19. CjkUnifiedIdeographFont
added in version 1.5.0
CJK統合漢字のフォント指定定数です。
宣言
public enum CjkUnifiedIdeographFont { Japanese, SimplifiedChinese, TraditionalChinese, Hangul }
定数
名称
説明
Japanese
日本語フォント
SimplifiedChinese
簡体字中国語フォント
TraditionalChinese
繁体字中国語フォント
Hangul
韓国語フォント
4.2.20. HoldPrintType
added in version 1.7.0
用紙保持制御の指定定数です。
宣言
public enum HoldPrintType { Invalid, Valid, Default }
定数
名称
説明
Invalid
用紙保持制御無効
Valid
用紙保持制御有効
Default
メモリスイッチ設定に従う
4.2.21. PaperPresentStatusType
added in version 1.7.0
用紙保持ステータス指定定数です。
宣言
public enum PaperPresentStatusType { Invalid, Valid, Default }
定数
名称
説明
Invalid
用紙保持ステータス無効
Valid
用紙保持ステータス有効
Default
メモリスイッチ設定に従う
4.2.22. Commands
コマンドバッファを取得します。
宣言
public byte[] Commands { get; }
引数
なし
戻り値
説明
型
コマンドバッファ
byte[]
実装例
public static byte[] CreateGenericData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.Append((byte)0x0a); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.23. BeginDocument
ドキュメント開始コマンドを生成し、コマンドバッファに追加します。
宣言
void BeginDocument();
引数
なし
戻り値
なし
実装例
public static byte[] CreateGenericData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.Append((byte)0x0a); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.24. EndDocument
ドキュメント終了コマンドを生成し、コマンドバッファに追加します。
宣言
void EndDocument();
引数
なし
戻り値
なし
実装例
public static byte[] CreateGenericData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.Append((byte)0x0a); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.25. AppendInitialization
初期化コマンドを生成し、コマンドバッファに追加します。
宣言
void appendInitialization(InitializationType type);
引数
名称
説明
型
type
初期化タイプ
戻り値
なし
実装例
public static byte[] CreateInitializationData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.AppendMultiple(2, 2); builder.Append(data); builder.AppendFontStyle(FontStyleType.B); builder.Append(data); builder.AppendInitialization(InitializationType.Command); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.26. Append
データ(テキストやコマンド)を、コマンドバッファに追加します。
宣言
void Append(byte data); void Append(byte[] data);
引数
名称
説明
型
data
データ(テキストやコマンド)
bytebyte[]戻り値
なし
実装例
public static byte[] CreateGenericData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.Append((byte)0x0a); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.27. AppendRaw
生のデータ(テキストやコマンド)を、コマンドバッファに追加します。
宣言
void AppendRaw(byte data); void AppendRaw(byte[] data);
引数
名称
説明
型
data
生のデータ(テキストやコマンド)
bytebyte[]戻り値
なし
実装例
public static byte[] CreateGenericData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendRaw(data); builder.AppendRaw((byte)0x0a); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
4.2.28. AppendFontStyle
フォントスタイル指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendFontStyle(FontStyleType type);
引数
名称
説明
型
type
フォントスタイル
戻り値
なし
実装例
public static byte[] CreateFontStyleData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.AppendFontStyle(FontStyleType.B); builder.Append(data); builder.AppendFontStyle(FontStyleType.A); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.29. AppendCodePage
コードページ指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendCodePage(CodePageType type);
引数
名称
説明
型
type
コードページ
戻り値
なし
実装例
public static byte[] CreateCodePageData(Emulation emulation) { byte[] bytes2 = new byte[] { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x0a }; ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendCodePage(CodePageType.CP998); builder.Append(bytes2); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.30. AppendInternational
国際文字指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendInternational(InternationalType type);
引数
名称
説明
型
type
国際文字
戻り値
なし
実装例
public static byte[] CreateInternationalData(Emulation emulation) { byte[] bytes = new byte[] { 0x23, 0x24, 0x40, 0x58, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x60, 0x7b, 0x7c, 0x7d, 0x7e, 0x0a }; ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendInternational(InternationalType.USA); builder.Append(bytes); builder.AppendInternational(InternationalType.Japan); builder.Append(bytes); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.31. AppendLineFeed
行単位の用紙送りコマンドを生成し、コマンドバッファに追加します。
宣言
void AppendLineFeed(); void AppendLineFeed(byte[] data); void AppendLineFeed(int line); void AppendLineFeed(byte[] data, int line);
引数
名称
説明
型
line
紙送り量(行数単位)
int
data
データ(テキストやコマンド)
byte[]
戻り値
なし
実装例
public static byte[] CreateFeedData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.AppendLineFeed(); builder.AppendLineFeed(data); builder.Append(data); builder.AppendLineFeed(2); builder.AppendLineFeed(data, 2); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.32. AppendUnitFeed
1ドットライン単位の用紙送りコマンドを生成し、コマンドバッファに追加します。
宣言
void AppendUnitFeed(int unit); void AppendUnitFeed(byte[] data, int unit);
引数
名称
説明
型
unit
紙送り量(ドット数単位)
int
data
データ(テキストやコマンド)
byte[]
戻り値
なし
実装例
public static byte[] CreateFeedData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.AppendUnitFeed(64); builder.AppendUnitFeed(data, 64); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.33. AppendCharacterSpace
文字間スペース設定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendCharacterSpace(int space);
引数
名称
説明
型
space
文字間スペース(ドット数単位)
int
戻り値
なし
重要
日本語、中国語簡体字、中国語繁体字、韓国語(DBCS)では、文字間スペースが設定値の2倍になります。
実装例
public static byte[] CreateCharacterSpaceData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendCharacterSpace(0); builder.AppendLineFeed(data); builder.AppendCharacterSpace(4); builder.AppendLineFeed(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.34. AppendLineSpace
行間スペース設定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendLineSpace(int lineSpace);
引数
名称
説明
型
lineSpace
行間スペース(ドット数単位)
int
戻り値
なし
実装例
public static byte[] CreateLineSpaceData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendLineSpace(32); builder.AppendLineFeed(data); builder.AppendLineFeed(data); builder.AppendLineFeed(data); builder.AppendLineSpace(24); builder.AppendLineFeed(data); builder.AppendLineFeed(data); builder.AppendLineFeed(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.35. AppendTopMargin
added in version 1.2.0
トップマージン設定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendTopMargin(int margin);
引数
名称
説明
型
margin
トップマージン(1ミリメートル単位)
int
戻り値
なし
実装例
public static byte[] CreateTopMarginData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendTopMargin(2); builder.Append(Encoding.UTF8.GetBytes("*Top margin:2mm*\n")); builder.Append(data); builder.Append(data); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.AppendTopMargin(6); builder.Append(Encoding.UTF8.GetBytes("*Top margin:6mm*\n")); builder.Append(data); builder.Append(data); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.AppendTopMargin(11); builder.Append(Encoding.UTF8.GetBytes("*Top margin:11mm*\n")); builder.Append(data); builder.Append(data); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.36. AppendEmphasis
強調指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendEmphasis(bool emphasis); void AppendEmphasis(byte[] data);
引数
名称
説明
型
emphasis
強調true ... 強調設定false ... 強調解除bool
data
データ(テキストやコマンド)
byte[]
戻り値
なし
実装例
public static byte[] CreateEmphasisData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); byte[] dataHalf0 = Encoding.UTF8.GetBytes("Hello "); byte[] dataHalf1 = Encoding.UTF8.GetBytes("World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendEmphasis(true); builder.Append(data); builder.AppendEmphasis(false); builder.Append(data); builder.AppendEmphasis(data); builder.Append(data); builder.AppendEmphasis(dataHalf0); builder.Append(dataHalf1); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.37. AppendInvert
白黒反転指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendInvert(bool invert); void AppendInvert(byte[] data);
引数
名称
説明
型
invert
白黒反転true ... 白黒反転設定false ... 白黒反転解除bool
data
データ(テキストやコマンド)
byte[]
戻り値
なし
実装例
public static byte[] CreateInvertData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); byte[] dataHalf0 = Encoding.UTF8.GetBytes("Hello "); byte[] dataHalf1 = Encoding.UTF8.GetBytes("World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendInvert(true); builder.Append(data); builder.AppendInvert(false); builder.Append(data); builder.AppendInvert(data); builder.Append(data); builder.AppendInvert(dataHalf0); builder.Append(dataHalf1); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.38. AppendMultiple
拡大指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendMultiple(int width, int height); void AppendMultiple(byte[] data, int width, int height); void AppendMultipleHeight(int height); void AppendMultipleHeight(byte[] data, int height); void AppendMultipleWidth(int width); void AppendMultipleWidth(byte[] data, int width);
引数
名称
説明
型
width
横倍率
int
height
縦倍率
int
data
データ(テキストやコマンド)
byte[]
戻り値
なし
実装例
public static byte[] CreateMultipleData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); byte[] dataHalf0 = Encoding.UTF8.GetBytes("Hello "); byte[] dataHalf1 = Encoding.UTF8.GetBytes("World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendMultiple(2, 2); builder.Append(data); builder.AppendMultiple(data, 2, 2); builder.Append(data); builder.AppendMultiple(dataHalf0, 2, 2); builder.Append(dataHalf1); builder.AppendMultipleHeight(2); builder.Append(data); builder.AppendMultipleHeight(dataHalf0, 2); builder.Append(dataHalf1); builder.AppendMultipleWidth(2); builder.Append(data); builder.AppendMultipleWidth(dataHalf0, 2); builder.Append(dataHalf1); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.39. AppendUnderLine
アンダーライン指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendUnderLine(bool underLine); void AppendUnderLine(byte[] data);
引数
名称
説明
型
underLine
アンダーラインtrue ... アンダーライン設定false ... アンダーライン解除bool
data
データ(テキストやコマンド)
byte[]
戻り値
なし
実装例
public static byte[] CreateUnderLineData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendUnderLine(true); builder.Append(data); builder.AppendUnderLine(false); builder.Append(data); builder.AppendUnderLine(data); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.40. AppendLogo
ロゴ印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendLogo(LogoSize size, int number);
引数
名称
説明
型
size
ロゴサイズ
number
ロゴ番号
int
戻り値
なし
実装例
public static byte[] CreateLogoData(Emulation emulation) { ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendLogo(LogoSize.Normal, 1); builder.AppendLogo(LogoSize.DoubleWidth, 1); builder.AppendLogo(LogoSize.DoubleHeight, 1); builder.AppendLogo(LogoSize.DoubleWidthDoubleHeight, 1); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.41. AppendAbsolutePosition
絶対位置指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendAbsolutePosition(int position); void AppendAbsolutePosition(byte[] data, int position);
引数
名称
説明
型
position
絶対位置(ドット数単位)
int
data
データ(テキストやコマンド)
byte[]
戻り値
なし
実装例
public static byte[] CreateAbsolutePositionData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendAbsolutePosition(40); builder.Append(data); builder.Append(data); builder.AppendAbsolutePosition(data, 40); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.42. AppendAlignment
位置揃え指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendAlignment(AlignmentPosition position); void AppendAlignment(byte[] data, AlignmentPosition position);
引数
名称
説明
型
position
位置揃え
data
データ(テキストやコマンド)
byte[]
戻り値
なし
重要
AppendBitmap、 AppendBarcode、AppendQrCode、AppendPdf417 メソッドと組み合わせての位置揃えはできません。 それぞれ AppendBitmapWithAlignment、 AppendBarcodeWithAlignment、AppendQrCodeWithAlignment、AppendPdf417WithAlignment メソッドをご利用ください。
実装例
public static byte[] CreateAlignmentData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendAlignment(AlignmentPosition.Right); builder.Append(data); builder.AppendAlignment(AlignmentPosition.Left); builder.Append(data); builder.AppendAlignment(data, AlignmentPosition.Center); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.43. AppendHorizontalTabPosition
added in version 1.1.0
水平タブ設定/クリアコマンドを生成し、コマンドバッファに追加します。
宣言
void AppendHorizontalTabPosition(int[] positions);
引数
名称
説明
型
positions
水平タブ位置(ANK文字ピッチ単位)の配列null もしくは空の配列を指定した場合、現在設定されている水平タブ位置をすべてクリアします。int[]
戻り値
なし
実装例
public static byte[] CreateHorizontalTabData(Emulation emulation) { byte[] data1 = Encoding.UTF8.GetBytes("QTY\tITEM\tTOTAL\n"); byte[] data2 = Encoding.UTF8.GetBytes("1\tApple\t1.50\n"); byte[] data3 = Encoding.UTF8.GetBytes("2\tOrange\t2.00\n"); byte[] data4 = Encoding.UTF8.GetBytes("5\tBanana\t3.00\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendHorizontalTabPosition(new int[] { 5, 27 }); builder.Append(Encoding.UTF8.GetBytes("*Tab Position:5, 27*\n")); builder.Append(data1); builder.Append(data2); builder.Append(data3); builder.Append(data4); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.44. AppendCutPaper
用紙カットコマンドを生成し、コマンドバッファに追加します。
宣言
void AppendCutPaper(CutPaperAction action);
引数
名称
説明
型
action
用紙カット
戻り値
なし
実装例
public static byte[] CreateGenericData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World."); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.Append((byte)0x0a); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.45. AppendPeripheral
キャッシュドロアー駆動コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendPeripheral(PeripheralChannel channel); void AppendPeripheral(PeripheralChannel channel, int time);
引数
名称
説明
型
channel
キャッシュドロアーチャネル
time
駆動時間(1ミリ秒単位)※チャネル1のみ有効int
戻り値
なし
実装例
public static byte[] CreatePeripheralData(Emulation emulation) { ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendPeripheral(PeripheralChannel.No1); builder.AppendPeripheral(PeripheralChannel.No2); builder.AppendPeripheral(PeripheralChannel.No1, 2000); builder.AppendPeripheral(PeripheralChannel.No2, 2000); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.46. AppendSound
サウンド/サウンド/ブザー駆動コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendSound(SoundChannel channel); void AppendSound(SoundChannel channel, int repeat); void AppendSound(SoundChannel channel, int repeat, int driveTime, int delayTime);
引数
名称
説明
型
ライブラリバージョン
channel サウンド/ブザーチャネル
1.0.0+ repeat 繰り返し回数
int
1.0.0+ driveTime 駆動時間(1ミリ秒単位)
int
1.2.0+ delayTime ディレイ時間(1ミリ秒単位)
int
1.2.0+ 戻り値
なし
警告
ブザー以外を接続して本メソッドを使用しないでください。正常動作しない場合や、プリンターおよび外部機器本体が破損する恐れがあります。
実装例
public static byte[] CreateSoundData(Emulation emulation) { ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendSound(SoundChannel.No1); builder.AppendSound(SoundChannel.No2); builder.AppendSound(SoundChannel.No1, 3); builder.AppendSound(SoundChannel.No2, 3); builder.AppendSound(SoundChannel.No1, 1, 1000, 1000); builder.AppendSound(SoundChannel.No2, 1, 1000, 1000); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.47. AppendBarcode
バーコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendBarcode(byte[] data, BarcodeSymbology symbology, BarcodeWidth width, int height, bool hri);
引数
名称
説明
型
data
バーコードデータ
byte[]
symbology
バーコードシンボル
width
バーコード幅
height
バーコードの高さ(ドット数単位)
int
hri
バー下文字列true ... 印刷ありfalse ... 印刷なしbool
戻り値
なし
実装例
public static byte[] CreateBarcodeData(Emulation emulation) { byte[] dataCode128 = Encoding.UTF8.GetBytes("{B0123456789"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendBarcode(dataCode128, BarcodeSymbology.Code128, BarcodeWidth.Mode1, 40, true); builder.AppendUnitFeed(32); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.48. AppendBarcodeWithAbsolutePosition
絶対位置指定バーコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendBarcodeWithAbsolutePosition(byte[] data, BarcodeSymbology symbology, BarcodeWidth width, int height, bool hri, int position);
引数
名称
説明
型
position
絶対位置(ドット数単位)
int
data
バーコードデータ
byte[]
symbology
バーコードシンボル
width
バーコード幅
height
バーコードの高さ(ドット数単位)
int
hri
バー下文字列true ... 印刷ありfalse ... 印刷なしbool
戻り値
なし
実装例
public static byte[] CreateBarcodeData(Emulation emulation) { byte[] dataCode128 = Encoding.UTF8.GetBytes("{B0123456789"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendBarcodeWithAbsolutePosition(dataUpcE, BarcodeSymbology.UPCE, BarcodeWidth.Mode1, 40, true, 40); builder.AppendUnitFeed(32); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.49. AppendBarcodeWithAlignment
位置揃えバーコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendBarcodeWithAlignment(byte[] data, BarcodeSymbology symbology, BarcodeWidth width, int height, bool hri, AlignmentPosition position);
引数
名称
説明
型
position
位置揃え指定
data
バーコードデータ
byte[]
symbology
バーコードシンボル
width
バーコード幅
height
バーコードの高さ(ドット数単位)
int
hri
バー下文字列true ... 印刷ありfalse ... 印刷なしbool
戻り値
なし
実装例
public static byte[] CreateBarcodeData(Emulation emulation) { byte[] dataCode128 = Encoding.UTF8.GetBytes("{B0123456789"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendBarcodeWithAlignment(dataUpcE, BarcodeSymbology.UPCE, BarcodeWidth.Mode1, 40, true, AlignmentPosition.Center); builder.AppendUnitFeed(32); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.50. AppendPdf417
PDF417印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendPdf417(byte[] data, int line, int column, Pdf417Level level, int module, int aspect);
引数
名称
説明
型
data
PDF417データ
byte[]
line
ライン数
int
column
カラム数
int
level
PDF417 ECC(セキュリティレベル)
module
モジュールX方向サイズ
int
aspect
モジュールアスペクト比
int
戻り値
なし
実装例
public static byte[] CreatePdf417Data(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendPdf417(data, 0, 1, Pdf417Level.ECC0, 2, 2); builder.AppendUnitFeed(32); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.51. AppendPdf417WithAbsolutePosition
絶対位置指定PDF417印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendPdf417WithAbsolutePosition(byte[] data, int line, int column, Pdf417Level level, int module, int aspect, int position);
引数
名称
説明
型
position
絶対位置(ドット数単位)
int
data
PDF417データ
byte[]
line
ライン数
int
column
カラム数
int
level
PDF417 ECC(セキュリティレベル)
module
モジュールX方向サイズ
int
aspect
モジュールアスペクト比
int
戻り値
なし
実装例
public static byte[] CreatePdf417Data(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendPdf417WithAbsolutePosition(data, 0, 1, Pdf417Level.ECC0, 2, 2, 40); builder.AppendUnitFeed(32); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.52. AppendPdf417WithAlignment
位置揃えPDF417印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendPdf417WithAlignment(byte[] data, int line, int column, Pdf417Level level, int module, int aspect, AlignmentPosition position);
引数
名称
説明
型
position
位置揃え指定
data
PDF417データ
byte[]
line
ライン数
int
column
カラム数
int
level
PDF417 ECC(セキュリティレベル)
module
モジュールX方向サイズ
int
aspect
モジュールアスペクト比
int
戻り値
なし
実装例
public static byte[] CreatePdf417Data(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendPdf417WithAlignment(data, 0, 1, Pdf417Level.ECC0, 2, 2, AlignmentPosition.Center); builder.AppendUnitFeed(32); builder.AppendPdf417WithAlignment(data, 0, 1, Pdf417Level.ECC0, 2, 2, AlignmentPosition.Right); builder.AppendUnitFeed(32); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.53. AppendQrCode
QRコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendQrCode(byte[] data, QrCodeModel model, QrCodeLevel level, int cell);
引数
名称
説明
型
data
QRコードデータ
byte[]
model
QRコードモデル
level
QRコード誤り訂正レベル
cell
QRコードセルサイズ
int
戻り値
なし
実装例
public static byte[] CreateQrCodeData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendQrCode(data, QrCodeModel.No2, QrCodeLevel.L, 2); builder.AppendUnitFeed(32); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.54. AppendQrCodeWithAbsolutePosition
絶対位置指定QRコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendQrCodeWithAbsolutePosition(byte[] data, QrCodeModel model, QrCodeLevel level, int cell, int position);
引数
名称
説明
型
position
絶対位置(ドット数単位)
int
data
QRコードデータ
byte[]
model
QRコードモデル
level
QRコード誤り訂正レベル
cell
QRコードセルサイズ
int
戻り値
なし
実装例
public static byte[] CreateQrCodeData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendQrCodeWithAbsolutePosition(data, QrCodeModel.No2, QrCodeLevel.L, 4, 40); builder.AppendUnitFeed(32); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.55. AppendQrCodeWithAlignment
位置揃えQRコード印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendQrCodeWithAlignment(byte[] data, QrCodeModel model, QrCodeLevel level, int cell, AlignmentPosition position);
引数
名称
説明
型
position
位置揃え指定
data
QRコードデータ
byte[]
model
QRコードモデル
level
QRコード誤り訂正レベル
cell
QRコードセルサイズ
int
戻り値
なし
実装例
public static byte[] CreateQrCodeData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendQrCodeWithAlignment(data, QrCodeModel.No2, QrCodeLevel.L, 4, AlignmentPosition.Center); builder.AppendUnitFeed(32); builder.AppendQrCodeWithAlignment(data, QrCodeModel.No2, QrCodeLevel.L, 4, AlignmentPosition.Right); builder.AppendUnitFeed(32); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.56. AppendBitmap
ビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendBitmap(Bitmap bitmap, bool diffusion, int width, bool bothScale, BitmapConverterRotation rotation); void AppendBitmap(Bitmap bitmap, bool diffusion, BitmapConverterRotation rotation); void AppendBitmap(Bitmap bitmap, bool diffusion, int width, bool bothScale); void AppendBitmap(Bitmap bitmap, bool diffusion);
引数
名称
説明
型
bitmap
元となるビットマップオブジェクト
System.Drawing.Bitmap
diffusion
誤差拡散true ... 誤差拡散を行うfalse ... 誤差拡散を行わないbool
width
変換後のビットマップ幅(ドット数単位)
int
bothScale
widthプロパティによる変換率に合わせた高さ変換true ... 高さ変換を行うfalse ... 高さ変換を行わないbool
rotation
変換後の回転
戻り値
なし
実装例
public static byte[] CreateBitmapData(Emulation emulation, int width) { Bitmap starLogoImage; using (var stream = Properties.Resources.star_logo_image) { starLogoImage = new Bitmap(stream); } ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendBitmap(starLogoImage, true); builder.AppendBitmap(starLogoImage, true, width, true); builder.AppendBitmap(starLogoImage, true, BitmapConverterRotation.Rotate180); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.57. AppendBitmapWithAbsolutePosition
絶対位置指定ビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendBitmapWithAbsolutePosition(Bitmap bitmap, bool diffusion, int width, bool bothScale, BitmapConverterRotation rotation, int position); void AppendBitmapWithAbsolutePosition(Bitmap bitmap, bool diffusion, BitmapConverterRotation rotation, int position); void AppendBitmapWithAbsolutePosition(Bitmap bitmap, bool diffusion, int width, bool bothScale, int position); void AppendBitmapWithAbsolutePosition(Bitmap bitmap, bool diffusion, int position);
引数
名称
説明
型
position
絶対位置(ドット数単位)
int
bitmap
元となるビットマップオブジェクト
System.Drawing.Bitmap
diffusion
誤差拡散true ... 誤差拡散を行うfalse ... 誤差拡散を行わないbool
width
変換後のビットマップ幅(ドット数単位)
int
bothScale
widthプロパティによる変換率に合わせた高さ変換true ... 高さ変換を行うfalse ... 高さ変換を行わないbool
rotation
変換後の回転
戻り値
なし
実装例
public static byte[] CreateBitmapData(Emulation emulation, int width) { Bitmap starLogoImage; using (var stream = Properties.Resources.star_logo_image) { starLogoImage = new Bitmap(stream); } ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendBitmapWithAbsolutePosition(starLogoImage, true, 40); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.58. AppendBitmapWithAlignment
位置揃えビットマップ印刷コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendBitmapWithAlignment(Bitmap bitmap, bool diffusion, int width, bool bothScale, BitmapConverterRotation rotation, AlignmentPosition position); void AppendBitmapWithAlignment(Bitmap bitmap, bool diffusion, BitmapConverterRotation rotation, AlignmentPosition position); void AppendBitmapWithAlignment(Bitmap bitmap, bool diffusion, int width, bool bothScale, AlignmentPosition position); void AppendBitmapWithAlignment(Bitmap bitmap, bool diffusion, AlignmentPosition position);
引数
名称
説明
型
position
位置揃え指定
bitmap
元となるビットマップオブジェクト
System.Drawing.Bitmap
diffusion
誤差拡散true ... 誤差拡散を行うfalse ... 誤差拡散を行わないbool
width
変換後のビットマップ幅(ドット数単位)
int
bothScale
widthプロパティによる変換率に合わせた高さ変換true ... 高さ変換を行うfalse ... 高さ変換を行わないbool
rotation
変換後の回転
戻り値
なし
実装例
public static byte[] CreateBitmapData(Emulation emulation, int width) { Bitmap starLogoImage; using (var stream = Properties.Resources.star_logo_image) { starLogoImage = new Bitmap(stream); } ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendBitmapWithAlignment(starLogoImage, true, AlignmentPosition.Right); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.59. AppendBlackMark
ブラックマーク検出コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendBlackMark(BlackMarkType type);
引数
名称
説明
型
type
ブラックマーク検出指定
戻り値
なし
実装例
public static byte[] CreateBlackMarkData(Emulation emulation, BlackMarkType type) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendBlackMark(type); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); //builder.AppendBlackMark(BlackMarkType.Invalid); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.60. AppendLabel
added in version 1.8.0
ダイカットラベル紙等のギャップ検出指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendLabelType(LabelType type);
引数
名称
説明
型
type
ギャップ検出指定
戻り値
なし
実装例
public static byte[] CreateLabelData(Emulation emulation, LabelType type) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.AppendLabel(type); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); //builder.AppendLabel(LabelType.Invalid); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.61. BeginPageMode
ページモード開始コマンドを生成し、コマンドバッファに追加します。
宣言
void BeginPageMode(Rectangle printRegion, BitmapConverterRotation rotation);
引数
名称
説明
型
rect
位置とサイズ(ドット数単位)
Rectangle
rotation
印刷方向
戻り値
なし
実装例
public static byte[] CreatePageModeData(Emulation emulation, int width) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); int height = 30 * 8; // 30mm!! Rectangle rectangle; ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); rectangle = new Rectangle(0, 0, width, height); builder.BeginPageMode(rectangle, BitmapConverterRotation.Normal); builder.Append(data); builder.AppendPageModeVerticalAbsolutePosition(160); builder.Append(data); builder.AppendPageModeVerticalAbsolutePosition(80); builder.AppendAbsolutePosition(data, 40); builder.EndPageMode(); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.62. EndPageMode
ページモード終了コマンドを生成し、コマンドバッファに追加します。
宣言
void EndPageMode();
引数
なし
戻り値
なし
実装例
public static byte[] CreatePageModeData(Emulation emulation, int width) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); int height = 30 * 8; // 30mm!! Rectangle rectangle; ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); rectangle = new Rectangle(0, 0, width, height); builder.BeginPageMode(rectangle, BitmapConverterRotation.Normal); builder.Append(data); builder.AppendPageModeVerticalAbsolutePosition(160); builder.Append(data); builder.AppendPageModeVerticalAbsolutePosition(80); builder.AppendAbsolutePosition(data, 40); builder.EndPageMode(); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.63. AppendPageModeVerticalAbsolutePosition
ページモードの縦方向絶対位置指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendPageModeVerticalAbsolutePosition(int position);
引数
名称
説明
型
position
縦方向の絶対位置(ドット数単位)
int
戻り値
なし
実装例
public static byte[] CreatePageModeData(Emulation emulation, int width) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); int height = 30 * 8; // 30mm!! Rectangle rectangle; ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); rectangle = new Rectangle(0, 0, width, height); builder.BeginPageMode(rectangle, BitmapConverterRotation.Normal); builder.Append(data); builder.AppendPageModeVerticalAbsolutePosition(160); builder.Append(data); builder.AppendPageModeVerticalAbsolutePosition(80); builder.AppendAbsolutePosition(data, 40); builder.EndPageMode(); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.64. AppendPageModeRotation
ページモード印刷方向コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendPageModeRotation(BitmapConverterRotation rotation);
引数
名称
説明
型
rotation
印刷方向
戻り値
なし
実装例
public static byte[] CreatePageModeData(Emulation emulation, int width) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); Bitmap starLogoImage; using (var stream = Properties.Resources.star_logo_image) { starLogoImage = new Bitmap(stream); } int height = 30 * 8; // 30mm!! Rectangle rectangle; ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); //rectangle = new Rectangle(0, 0, width, height); rectangle = new Rectangle(0, 0, width, width); builder.BeginPageMode(rectangle, BitmapConverterRotation.Normal); builder.AppendPageModeVerticalAbsolutePosition(width / 2); builder.AppendBitmapWithAbsolutePosition(starLogoImage, false, width / 2); builder.AppendPageModeRotation(BitmapConverterRotation.Right90); builder.AppendPageModeVerticalAbsolutePosition(width / 2); builder.AppendBitmapWithAbsolutePosition(starLogoImage, true, width / 2); builder.AppendPageModeRotation(BitmapConverterRotation.Rotate180); builder.AppendPageModeVerticalAbsolutePosition(width / 2); builder.AppendBitmapWithAbsolutePosition(starLogoImage, true, width / 2); builder.AppendPageModeRotation(BitmapConverterRotation.Left90); builder.AppendPageModeVerticalAbsolutePosition(width / 2); builder.AppendBitmapWithAbsolutePosition(starLogoImage, true, width / 2); builder.EndPageMode(); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.65. AppendPrintableArea
added in version 1.2.0
印字領域設定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendPrintableArea(PrintableAreaType type);
引数
名称
説明
型
type
印字領域タイプ
戻り値
なし
単位:mm
指定するPrintableAreaTypeと設定される印字領域の対応は以下のとおりです。
モデル/エミュレーション |
mC-Print2 | mC-Print3 | mC-Label3 | mPOP | FVP10 | TSP100IV | TSP100IV SK | TSP100IIIW | TSP100IIIBI | TSP100IIIU | TSP100ECO | TSP100U | TSP100GT | TSP100LAN | TSP650II | TSP650IISK | TSP700II | TSP800II | SM-S210i | SM-S220i | SM-S230i | SM-T300i/T300 | SM-T400i | BSC10II | BSC10 | SM-L200 | SM-L300 | SP700 | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StarPRNT | StarPRNT | StarPRNT | StarPRNT | StarLine | StarPRNT | StarPRNT | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarLine | StarLine | StarLine | StarLine | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPos | StarPRNT | StarPRNT | StarDotImpact | |
Standard |
48 | 72[1] | 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] | 72[1] | 104[2] | - | - | - | - | - | - | - | - | - | - | 72[1] | 64[1][3] | - | 72[1] | 63 |
Type1 |
54 | - | 54 | 54 | 52.5 | 51 | 51 | 51 | 51 | 51 | 51 | 51 | 51 | 51 | - | 34.5 | 52.5 | - | - | - | - | - | - | - | - | - | - | - | 51 | - | - | - | 48 |
Type2 |
- | 48 | 48 | - | - | 48 | 48 | - | - | - | - | - | - | - | - | 32 | 80[1] | 72 | - | - | - | - | - | - | - | - | - | - | 48 | - | - | - | 60 |
Type3 |
50.8 | 50.8 | 50.8 | 50.8 | 50.8 | 50.8 | 50.8 | - | - | - | - | - | - | - | 50.8 | 50.8 | 50.8 | - | - | - | - | - | - | - | - | - | - | - | 50.8 | 45[3] | - | 50.8 | 45 |
Type4 |
- | - | - | - | 52 | - | - | - | - | - | - | - | - | - | - | - | 52 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | 57 |
[1] | 2インチ紙を使用時、3インチ幅の印字領域設定を行わないでください |
[2] | 3インチ紙を使用時、4インチ幅の印字領域設定を行わないでください |
[3] | メモリスイッチの印字桁数を”最大桁数”に設定することで、Standardの場合72mm、Type3の場合50.8mmに設定されます。(メモリスイッチ4のビット4を1に設定) |
注釈
実装例
public static byte[] CreatePrintableAreaData(Emulation emulation, PrintableAreaType type) { ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); Bitmap printableAreaImage using(Bitmap stream = Resources.printable_area_image) { printableAreaImage = new Bitmap(stream); } byte[] data1 = Encoding.UTF8.GetBytes("123456789"); byte[] data2 = Encoding.UTF8.GetBytes("0"); builder.BeginDocument(); builder.AppendPrintableArea(type); switch(type) { default: case PrintableAreType.Standard: builder.Append(Encoding.UTF8.GetBytes("*Standard*\n")); break; case PrintableAreType.Type1 builder.Append(Encoding.UTF8.GetBytes("*Type1*\n")); break; case PrintableAreType.Type2 builder.Append(Encoding.UTF8.GetBytes("*Type2*\n")); break; case PrintableAreType.Type3 builder.Append(Encoding.UTF8.GetBytes("*Type3*\n")); break; case PrintableAreType.Type4 builder.Append(Encoding.UTF8.GetBytes("*Type4*\n")); break; } builder.AppendBitmap(printableAreaImage, true); builder.Append(data1); builder.AppendInvert(data2); builder.Append(data1); builder.AppendInvert(data2); builder.Append(data1); builder.AppendInvert(data2); builder.Append(data1); builder.AppendInvert(data2); builder.Append(data1); builder.AppendInvert(data2); builder.Append(data1); builder.AppendInvert(data2); builder.Append(data1); builder.AppendInvert(data2); builder.Append(data1); builder.AppendInvert(data2); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return builder.Commands; }
APIFunctions.csを参照ください。
4.2.66. AppendCjkUnifiedIdeographFont
added in version 1.5.0
UTF-8におけるCJK統合漢字のフォント設定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendCjkUnifiedIdeographFont (params CjkUnifiedIdeographFont[] fonts)
引数
名称
説明
型
font
CJK統合漢字のフォント2つ以上のフォントを指定した場合、先に指定したフォントから優先して印字されます。引数に何も指定しない場合、CJK統合漢字のフォント設定をメモリスイッチ設定に戻します。戻り値
なし
実装例
public override void Append3inchTextReceiptData(ICommandBuilder builder, bool utf8) { string encoding = "UTF-8"; builder.AppendCodePage(CodePageType.UTF8); builder.AppendCharacterSpace(0); builder.AppendAlignment(AlignmentPosition.Center); builder.Append(Encoding.GetEncoding(encoding).GetBytes("2017 / 5 / 15 AM 10:00\n")); builder.AppendMultiple(2, 2); // This function is supported by TSP650II(JP2/TW models only) with F/W version 4.0 or later and and mC-Print2/3. // Switch Kanji/Hangul font by specifying the font for Unicode CJK Unified Ideographs before each word. builder.AppendCjkUnifiedIdeographFont(CjkUnifiedIdeographFont.Japanese); builder.Append(Encoding.GetEncoding(encoding).GetBytes("受付票 ")); builder.AppendCjkUnifiedIdeographFont(CjkUnifiedIdeographFont.TraditionalChinese); builder.Append(Encoding.GetEncoding(encoding).GetBytes("排號單\n")); builder.AppendCjkUnifiedIdeographFont(CjkUnifiedIdeographFont.SimplifiedChinese); builder.Append(Encoding.GetEncoding(encoding).GetBytes("排号单 ")); builder.AppendCjkUnifiedIdeographFont(CjkUnifiedIdeographFont.Hangul); builder.Append(Encoding.GetEncoding(encoding).GetBytes("접수표\n\n")); builder.AppendMultiple(1, 1); builder.AppendCjkUnifiedIdeographFont(); builder.AppendMultiple(Encoding.GetEncoding(encoding).GetBytes("1\n"), 6, 6); builder.Append(Encoding.GetEncoding(encoding).GetBytes("------------------------------------------\n")); builder.AppendCjkUnifiedIdeographFont(CjkUnifiedIdeographFont.Japanese); builder.Append(Encoding.GetEncoding(encoding).GetBytes("ご本人がお持ちください。\n")); builder.Append(Encoding.GetEncoding(encoding).GetBytes("※紛失しないようにご注意ください。\n")); }
Utf8MultiLanguageReceipt.csを参照ください。
4.2.67. AppendHoldPrint
added in version 1.7.0
プリンターファームウェアによる用紙保持制御の指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendHoldPrint(HoldPrintType type);
引数
名称
説明
型
type
用紙保持制御
戻り値
なし
注釈
用紙保持制御の有効化
以下の設定により、用紙保持制御(用紙が抜き取られるまで BeginCheckedBlock メソッドがブロックされる)が有効化されます。 実装例も参照ください。
本メソッドで生成したコマンドにより、プリンターファームウェアによる用紙保持制御を無効に設定
AppendPaperPresentStatus メソッドで生成したコマンドにより、用紙保持ステータスを有効に設定
実装例
public static List<byte[]> CreateHoldPrintData(Emulation emulation, bool[] isHoldArray) { List<byte[]> commandList = new List<byte[]>(); for (int i = 0; i < isHoldArray.Length; i++) { ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); // Disable hold print controlled by printer firmware. builder.AppendHoldPrint(HoldPrintType.Invalid); if (isHoldArray[i]) { // Enable paper present status if wait paper removal before next printing. builder.AppendPaperPresentStatus(PaperPresentStatusType.Valid); } else { // Disable paper present status if do not wait paper removal before next printing. builder.AppendPaperPresentStatus(PaperPresentStatusType.Invalid); } // Create commands for printing. builder.AppendAlignment(AlignmentPosition.Center); builder.Append(Encoding.ASCII.GetBytes("\n------------------------------------\n\n\n\n\n\n")); builder.AppendMultiple(3, 3); builder.Append(Encoding.ASCII.GetBytes("Page ")); builder.Append(Encoding.ASCII.GetBytes((i+ 1).ToString())); builder.AppendMultiple(1, 1); builder.Append(Encoding.ASCII.GetBytes("\n\n\n\n\n----------------------------------\n")); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); commandList.Add(builder.Commands); } return commandList; }
4.2.68. AppendPaperPresentStatus
added in version 1.7.0
用紙保持ステータス指定コマンドを生成し、コマンドバッファに追加します。
宣言
void AppendPaperPresentStatus(PaperPresentStatusType type);
引数
名称
説明
型
type
用紙保持ステータス
戻り値
なし
実装例
AppendHoldPrint メソッドの実装例を参照ください。