4.2. ICommandBuilder
Provides a function to generate printer control commands.
Constant
Name
Contents
Initialization constants
Font style constants
Code Page constants
International character constants
Logo size constants
Alignment position constants
Paper cut constants
Cash drawer channel constants
Sound/Buzzer channel constants
Barcode symbology constants
Barcode width constants
PDF417 ECC (security level) constants
QR code model constants
QR code mistake correction level constants
Bitmap rotation constants
Black mark detection constants
Gap detection constants for die-cut label paper, etc
Printable area constants
Constants of CJK Unified Ideograph font in UTF-8
Constants to specify the hold print control
Hold print status constants
Property
Name
Contents
Generated commands.
Method
Name
Contents
Begin document command is generated and added to the command buffer.
End document command is generated and added to the command buffer.
Initialization command is generated and added to the command buffer.
Data (Text and Command) is added to the command buffer.
Raw data (Text and Command) is added to the command buffer.
Select command of the font style is generated and added to the command buffer.
Select command of the code page is generated and added to the command buffer.
Select command of the international character mode is generated and added to the command buffer.
Line feed command is generated and added to the command buffer.
Unit feed command is generated and added to the command buffer.
Set command of the character space is generated and added to the command buffer.
Set command of the line space is generated and added to the command buffer.
Set command of the top margin is generated and added to the command buffer.
Select command of the emphasis mode is generated and added to the command buffer.
Select command of the invert mode is generated and added to the command buffer.
Select command of the multiple mode is generated and added to the command buffer.
Select command of the underline mode is generated and added to the command buffer.
Print command of the logo is generated and added to the command buffer.
Absolute position command is generated and added to the command buffer.
Alignment command is generated and added to the command buffer.
Generates a clear command, and then adds it to the command buffer.
Paper cut command is generated and added to the command buffer.
Cash drawer command is generated and added to the command buffer.
Sound/Buzzer command is generated and added to the command buffer.
Print command of the barcode is generated and added to the command buffer.
Print command of the absolute position barcode is generated and added to the command buffer.
Print command of the alignment barcode is generated and added to the command buffer.
Print command of the PDF417 is generated and added to the command buffer.
Print command of the absolute position PDF417 is generated and added to the command buffer.
Print command of the alignment PDF417 is generated and added to the command buffer.
Print command of the QR code is generated and added to the command buffer.
Print command of the absolute position QR code is generated and added to the command buffer.
Print command of the alignment QR code is generated and added to the command buffer.
Print command of the bitmap is generated and added to the command buffer.
Print command of the absolute position bitmap is generated and added to the command buffer.
Print command of the alignment bitmap is generated and added to the command buffer.
Black mark detection command is generated and added to the command buffer.
Gap detection command for die-cut label paper, etc is generated and added to the command buffer.
Begin page mode command is generated and added to the command buffer.
End page mode command is generated and added to the command buffer.
Vertical absolute position in page mode command is generated and added to the command buffer.
Print direction in page mode command is generated and added to the command buffer.
Set command of the printable area is generated and added to the command buffer.
A command to set the UTF-8 CJK Unified Ideograph font is generated and added to the command buffer.
A command to specify the hold print control by the printer firmware is generated and added to the command buffer.
A command to specify hold print status is generated and added to the command buffer.
Supported method for each model.
Model/Emulation |
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] | Do not append data, append unit feed command only. |
[2] | When the top margin is set to 10 mm or less, the paper length (cut length) should not exceed 50mm. (If the cut paper remains at the paper-exit, a paper jam may occur. There is no limitation when the cut paper is removed.) |
[3] | MCP30 is not supported. |
[4] | Always print from normal size. |
[5] | Without paper cut. |
[6] | Confirm that the printed barcode can be read properly in real environment. |
[7] | Always print from left side. |
[8] | The maximum vertical direction printing area is 30cm (2400 dot). |
[9] | Only the front black mark can set enabled or disabled. Need to change printer setting to enable the back black mark (SM-T300i/T300 does not support the back black mark). Refer to hardware manual for how to change. |
[10] | Library version 1.6.0 or later is required |
[11] | Need to change printer setting to enable the black mark. Refer to hardware manual for how to change. |
[12] | JP2/TW model with Firmware version 4.0 or later is required. |
[13] | F/W Version 7.1 or later is required. |
4.2.1. InitializationType
Initialization constants
Declaration
public enum InitializationType { Command }
Constants
Name
Contents
Command
Command initialization
4.2.2. FontStyleType
Font style constants
Declaration
public enum FontStyleType { A, B }
Constants
Name
Contents
A
Font-A (12 x 24 dots) / Specify 7 x 9 font (half dots)
B
Font-B (9 x 24 dots) / Specify 5 x 9 font (2P-1)
4.2.3. CodePageType
Code Page constants
Declaration
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 }
Constants
Name
Contents
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
International character constants
Declaration
public enum InternationalType { USA, France, Germany, UK, Denmark, Sweden, Italy, Spain, Japan, Norway, Denmark2, Spain2, LatinAmerica, Korea, Ireland, India, Legal }
Constants
Name
Contents
USA
USA
France
France
Germany
Germany
UK
UK
Denmark
Denmark
Sweden
Sweden
Italy
Italy
Spain
Spain
Japan
Japan
Norway
Norway
Denmark2
Denmark2
Spain2
Spain2
LatinAmerica
Latin America
Korea
Korea
Ireland
Ireland
India
India [1]
Legal
Legal
[1] Only BSC10II is supported.
4.2.5. LogoSize
Logo size constants
Declaration
public enum LogoSize { Normal, DoubleWidth, DoubleHeight, DoubleWidthDoubleHeight }
Constants
Name
Contents
Normal
Normal
DoubleWidth
Double Width
DoubleHeight
Double Height
DoubleWidthDoubleHeight
Double Width / Height
4.2.6. AlignmentPosition
Alignment position constants
Declaration
public enum AlignmentPosition { Left, Center, Right }
Constants
Name
Contents
Left
Left alignment
Center
Center alignment
Right
Right alignment
4.2.7. CutPaperAction
Paper cut constants
Declaration
public enum CutPaperAction { FullCut, PartialCut, FullCutWithFeed, PartialCutWithFeed, TearOff }
Constants
Name
Contents
FullCut
Full Cut
PartialCut
Partial Cut
FullCutWithFeed
Full Cut with Feed
PartialCutWithFeed
Partial Cut with Feed
TearOff
Only Feed (No Cut)
4.2.8. PeripheralChannel
Cash drawer channel constants
Declaration
public enum PeripheralChannel { No1, No2 }
Constants
Name
Contents
No1
Channel1
No2
Channel2
4.2.9. SoundChannel
Sound/Buzzer channel constants
Declaration
public enum SoundChannel { No1, No2 }
Constants
Name
Contents
No1
Channel1
No2
Channel2
4.2.10. BarcodeSymbology
Barcode symbology constants
Declaration
public enum BarcodeSymbology { UPCE, UPCA, JAN8, JAN13, Code39, ITF, Code128, Code93, NW7 }
Constants
Name
Contents
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
Barcode width constants
By specifying ExtMode, the barcode mode conforming to each command specification is set.
Declaration
public enum BarcodeWidth { Mode1, Mode2, Mode3, Mode4, Mode5, Mode6, Mode7, Mode8, Mode9, ExtMode1, ExtMode2, ExtMode3, ExtMode4, ExtMode5, ExtMode6, ExtMode7, ExtMode8, ExtMode9 }
Constants
Name
Contents
Library version
Mode1
Mode1
1.0.0+ Mode2
Mode2
1.0.0+ Mode3
Mode3
1.0.0+ Mode4
Mode4
1.0.0+ Mode5
Mode5
1.0.0+ Mode6
Mode6
1.0.0+ Mode7
Mode7
1.0.0+ Mode8
Mode8
1.0.0+ Mode9
Mode9
1.0.0+ ExtMode1
ExtMode1
1.5.0+ ExtMode2
ExtMode2
1.5.0+ ExtMode3
ExtMode3
1.5.0+ ExtMode4
ExtMode4
1.5.0+ ExtMode5
ExtMode5
1.5.0+ ExtMode6
ExtMode6
1.5.0+ ExtMode7
ExtMode7
1.5.0+ ExtMode8
ExtMode8
1.5.0+ ExtMode9
ExtMode9
1.5.0+
4.2.12. Pdf417Level
PDF417 ECC (security level) constants
Declaration
public enum Pdf417Level { ECC0, ECC1, ECC2, ECC3, ECC4, ECC5, ECC6, ECC7, ECC8 }
Constants
Name
Contents
ECC0
Level0
ECC1
Level1
ECC2
Level2
ECC3
Level3
ECC4
Level4
ECC5
Level5
ECC6
Level6
ECC7
Level7
ECC8
Level8
4.2.13. QrCodeModel
QR code model constants
Declaration
public enum QrCodeModel { No1, No2 }
Constants
Name
Contents
No1
Model1
No2
Model2
4.2.14. QrCodeLevel
QR code mistake correction level constants
Declaration
public enum QrCodeLevel { L, M, Q, H }
Constants
Name
Contents
L
Level L
M
Level M
Q
Level Q
H
Level H
4.2.15. BitmapConverterRotation
Bitmap rotation constants
Declaration
public enum BitmapConverterRotation { Normal, Right90, Left90, Rotate180 }
Constants
Name
Contents
Normal
Rotated 0
Right90
Rotated 90
Left90
Rotated 270
Rotate180
Rotated 180
4.2.16. BlackMarkType
Black mark detection constants
Declaration
public enum BlackMarkType { Invalid, Valid, ValidWithDetection }
Constants
Name
Contents
Invalid
Black mark detection invalid
Valid
Black mark detection valid
ValidWithDetection
Black mark detection valid with detect at power on
4.2.17. LabelType
added in version 1.8.0
Gap detection constants for die-cut label paper, etc
Declaration
public enum LabelType { Invalid, Valid, ValidWithDetection }
Constants
Name
Contents
Invalid
Gap detection invalid
Valid
Gap detection valid
ValidWithDetection
Gap detection valid with detect at power on
4.2.18. PrintableAreaType
added in version 1.2.0
Printable area constants
Declaration
public enum PrintableAreaType { Standard, Type1, Type2, Type3, Type4 }
Constants
Name
Contents
Standard
Standard type
Type1
Type1
Type2
Type2
Type3
Type3
Type4
Type4
4.2.19. CjkUnifiedIdeographFont
added in version 1.5.0
Constants of CJK Unified Ideograph font in UTF-8
Declaration
public enum CjkUnifiedIdeographFont { Japanese, SimplifiedChinese, TraditionalChinese, Hangul }
Constants
Name
Contents
Japanese
Japanese font
SimplifiedChinese
Simplified Chinese font
TraditionalChinese
Traditional Chinese font
Hangul
Hangul font
4.2.20. HoldPrintType
added in version 1.7.0
Constants to specify the hold print control
Declaration
public enum HoldPrintType { Invalid, Valid, Default }
Constants
Name
Contents
Invalid
Invalid
Valid
Valid
Default
Follow the memory switch setting
4.2.21. PaperPresentStatusType
added in version 1.7.0
Hold print status constants
Declaration
public enum PaperPresentStatusType { Invalid, Valid, Default }
Constants
Name
Contents
Invalid
Invalid
Valid
Valid
Default
Follow the memory switch setting
4.2.22. Commands
Gets the command buffer.
Declaration
public byte[] Commands { get; }
Parameter
None
Return value
Contents
Type
Command buffer
byte[]
Examples
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; }
Refer to ApiFunctions.cs.
4.2.23. BeginDocument
Begin document command is generated and added to the command buffer.
Declaration
void BeginDocument();
Parameter
None
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.24. EndDocument
End document command is generated and added to the command buffer.
Declaration
void EndDocument();
Parameter
None
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.25. AppendInitialization
Initialization command is generated and added to the command buffer.
Declaration
void appendInitialization(InitializationType type);
Parameter
Name
Contents
Type
type
Initialization type
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.26. Append
Data (Text and Command) is added to the command buffer.
Declaration
void Append(byte data); void Append(byte[] data);
Parameter
Name
Contents
Type
data
Data (Text and Command)
bytebyte[]Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.27. AppendRaw
Raw data (Text and Command) is added to the command buffer.
Declaration
void AppendRaw(byte data); void AppendRaw(byte[] data);
Parameter
Name
Contents
Type
data
Raw data (Text and Command)
bytebyte[]Return value
None
Examples
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
Select command of the font style is generated and added to the command buffer.
Declaration
void AppendFontStyle(FontStyleType type);
Parameter
Name
Contents
Type
type
Font style
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.29. AppendCodePage
Select command of the code page is generated and added to the command buffer.
Declaration
void AppendCodePage(CodePageType type);
Parameter
Name
Contents
Type
type
Code Page
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.30. AppendInternational
Select command of the international character mode is generated and added to the command buffer.
Declaration
void AppendInternational(InternationalType type);
Parameter
Name
Contents
Type
type
International character
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.31. AppendLineFeed
Line feed command is generated and added to the command buffer.
Declaration
void AppendLineFeed(); void AppendLineFeed(byte[] data); void AppendLineFeed(int line); void AppendLineFeed(byte[] data, int line);
Parameter
Name
Contents
Type
line
Paper feed units. (Units : Lines)
int
data
Data (Text and Command)
byte[]
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.32. AppendUnitFeed
Unit feed command is generated and added to the command buffer.
Declaration
void AppendUnitFeed(int unit); void AppendUnitFeed(byte[] data, int unit);
Parameter
Name
Contents
Type
unit
Paper feed units. (Units : Dots)
int
data
Data (Text and Command)
byte[]
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.33. AppendCharacterSpace
Set command of the character space is generated and added to the command buffer.
Declaration
void AppendCharacterSpace(int space);
Parameter
Name
Contents
Type
space
Character spaces. (Units : Dots)
int
Return value
None
Important
In Japanese, Simplified Chinese, Traditional Chinese, and Korean (DBCS), the character space is to be twice.
Examples
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; }
Refer to ApiFunctions.cs.
4.2.34. AppendLineSpace
Set command of the line space is generated and added to the command buffer.
Declaration
void AppendLineSpace(int lineSpace);
Parameter
Name
Contents
Type
lineSpace
Line spaces. (Units : Dots)
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.35. AppendTopMargin
added in version 1.2.0
Set command of the top margin is generated and added to the command buffer.
Declaration
void AppendTopMargin(int margin);
Parameter
Name
Contents
Type
margin
Top margin. (Units : Millimeter)
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.36. AppendEmphasis
Select command of the emphasis mode is generated and added to the command buffer.
Declaration
void AppendEmphasis(bool emphasis); void AppendEmphasis(byte[] data);
Parameter
Name
Contents
Type
emphasis
Emphasistrue … Validfalse … Invalidbool
data
Data (Text and Command)
byte[]
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.37. AppendInvert
Select command of the invert mode is generated and added to the command buffer.
Declaration
void AppendInvert(bool invert); void AppendInvert(byte[] data);
Parameter
Name
Contents
Type
invert
Inverttrue … Validfalse … Invalidbool
data
Data (Text and Command)
byte[]
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.38. AppendMultiple
Select command of the multiple mode is generated and added to the command buffer.
Declaration
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);
Parameter
Name
Contents
Type
width
Expanded width
int
height
Expanded height
int
data
Data (Text and Command)
byte[]
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.39. AppendUnderLine
Select command of the underline mode is generated and added to the command buffer.
Declaration
void AppendUnderLine(bool underLine); void AppendUnderLine(byte[] data);
Parameter
Name
Contents
Type
underLine
Under linetrue … Validfalse … Invalidbool
data
Data (Text and Command)
byte[]
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.40. AppendLogo
Print command of the logo is generated and added to the command buffer.
Declaration
void AppendLogo(LogoSize size, int number);
Parameter
Name
Contents
Type
size
Logo size
number
Logo number
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.41. AppendAbsolutePosition
Absolute position command is generated and added to the command buffer.
Declaration
void AppendAbsolutePosition(int position); void AppendAbsolutePosition(byte[] data, int position);
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
int
data
Data (Text and Command)
byte[]
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.42. AppendAlignment
Alignment command is generated and added to the command buffer.
Declaration
void AppendAlignment(AlignmentPosition position); void AppendAlignment(byte[] data, AlignmentPosition position);
Parameter
Name
Contents
Type
position
Alignment position
data
Data (Text and Command)
byte[]
Return value
None
Important
This method cannot be used with AppendBitmap, AppendBarcode, AppendQrCode and AppendPdf417 for alignment. Instead, please use AppendBitmapWithAlignment, AppendBarcodeWithAlignment, AppendQrCodeWithAlignment and AppendPdf417WithAlignment respectively.
Examples
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; }
Refer to ApiFunctions.cs.
4.2.43. AppendHorizontalTabPosition
added in version 1.1.0
Horizontal tab set/clear command is generated and added to the command buffer.
Declaration
void AppendHorizontalTabPosition(int[] positions);
Parameter
Name
Contents
Type
positions
Array of horizontal tab positions (Units: ANK character pitch)Specifying null or empty array deletes all currently set horizontal tab positions.int[]
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.44. AppendCutPaper
Line feed and Paper cut commands are generated and added to the command buffer.
Declaration
void AppendCutPaper(CutPaperAction action);
Parameter
Name
Contents
Type
action
Paper cut
Return value
None
Note
Examples
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; }
Refer to ApiFunctions.cs.
4.2.45. AppendPeripheral
Cash drawer command is generated and added to the command buffer.
Declaration
void AppendPeripheral(PeripheralChannel channel); void AppendPeripheral(PeripheralChannel channel, int time);
Parameter
Name
Contents
Type
channel
Cash drawer channel
time
Drive time. (Units : mSec)* Peripheral channel1 only.int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.46. AppendSound
Sound/Buzzer command is generated and added to the command buffer.
Declaration
void AppendSound(SoundChannel channel); void AppendSound(SoundChannel channel, int repeat); void AppendSound(SoundChannel channel, int repeat, int driveTime, int delayTime);
Parameter
Name
Contents
Type
Library version
channel Sound/Buzzer channel
1.0.0+ repeat Repeat count
int
1.0.0+ driveTime Drive time. (Units : mSec)
int
1.2.0+ delayTime Delay time. (Units : mSec)
int
1.2.0+ Return value
None
Warning
Do not use this method with anything other than the buzzer connected. It may not work properly, and the printer or the peripheral unit in use may cause damage.
Examples
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; }
Refer to ApiFunctions.cs.
4.2.47. AppendBarcode
Print command of the barcode is generated and added to the command buffer.
Declaration
void AppendBarcode(byte[] data, BarcodeSymbology symbology, BarcodeWidth width, int height, bool hri);
Parameter
Name
Contents
Type
data
Barcode data
byte[]
symbology
Barcode symbology
width
Barcode width
height
Barcode height. (Units : Dots)
int
hri
Under-bar characterstrue … Validfalse … Invalidbool
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.48. AppendBarcodeWithAbsolutePosition
Print command of the absolute position barcode is generated and added to the command buffer.
Declaration
void AppendBarcodeWithAbsolutePosition(byte[] data, BarcodeSymbology symbology, BarcodeWidth width, int height, bool hri, int position);
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
int
data
Barcode data
byte[]
symbology
Barcode symbology
width
Barcode width
height
Barcode height. (Units : Dots)
int
hri
Under-bar characterstrue … Validfalse … Invalidbool
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.49. AppendBarcodeWithAlignment
Print command of the alignment barcode is generated and added to the command buffer.
Declaration
void AppendBarcodeWithAlignment(byte[] data, BarcodeSymbology symbology, BarcodeWidth width, int height, bool hri, AlignmentPosition position);
Parameter
Name
Contents
Type
position
Alignment position
data
Barcode data
byte[]
symbology
Barcode symbology
width
Barcode width
height
Barcode height. (Units : Dots)
int
hri
Under-bar characterstrue … Validfalse … Invalidbool
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.50. AppendPdf417
Print command of the PDF417 is generated and added to the command buffer.
Declaration
void AppendPdf417(byte[] data, int line, int column, Pdf417Level level, int module, int aspect);
Parameter
Name
Contents
Type
data
PDF417 data
byte[]
line
Number of lines
int
column
Number of columns
int
level
PDF417 ECC (security level)
module
Module X direction size
int
aspect
Module aspect ratio
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.51. AppendPdf417WithAbsolutePosition
Print command of the absolute position PDF417 is generated and added to the command buffer.
Declaration
void AppendPdf417WithAbsolutePosition(byte[] data, int line, int column, Pdf417Level level, int module, int aspect, int position);
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
int
data
PDF417 data
byte[]
line
Number of lines
int
column
Number of columns
int
level
PDF417 ECC (security level)
module
Module X direction size
int
aspect
Module aspect ratio
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.52. AppendPdf417WithAlignment
Print command of the alignment PDF417 is generated and added to the command buffer.
Declaration
void AppendPdf417WithAlignment(byte[] data, int line, int column, Pdf417Level level, int module, int aspect, AlignmentPosition position);
Parameter
Name
Contents
Type
position
Alignment position
data
PDF417 data
byte[]
line
Number of lines
int
column
Number of columns
int
level
PDF417 ECC (security level)
module
Module X direction size
int
aspect
Module aspect ratio
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.53. AppendQrCode
Print command of the QR code is generated and added to the command buffer.
Declaration
void AppendQrCode(byte[] data, QrCodeModel model, QrCodeLevel level, int cell);
Parameter
Name
Contents
Type
data
QR code data
byte[]
model
QR code model
level
QR code mistake correction level
cell
QR code cell size
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.54. AppendQrCodeWithAbsolutePosition
Print command of the absolute position QR code is generated and added to the command buffer.
Declaration
void AppendQrCodeWithAbsolutePosition(byte[] data, QrCodeModel model, QrCodeLevel level, int cell, int position);
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
int
data
QR code data
byte[]
model
QR code model
level
QR code mistake correction level
cell
QR code cell size
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.55. AppendQrCodeWithAlignment
Print command of the alignment QR code is generated and added to the command buffer.
Declaration
void AppendQrCodeWithAlignment(byte[] data, QrCodeModel model, QrCodeLevel level, int cell, AlignmentPosition position);
Parameter
Name
Contents
Type
position
Alignment position
data
QR code data
byte[]
model
QR code model
level
QR code mistake correction level
cell
QR code cell size
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.56. AppendBitmap
Print command of the bitmap is generated and added to the command buffer.
Declaration
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);
Parameter
Name
Contents
Type
bitmap
Source bitmap object
System.Drawing.Bitmap
diffusion
Random dithertrue … Validfalse … Invalidbool
width
Bitmap width after conversion. (Units : Dots)
int
bothScale
Height is changed according to the conversion rate of the width property.true … Validfalse … Invalidbool
rotation
Rotation.
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.57. AppendBitmapWithAbsolutePosition
Print command of the absolute position bitmap is generated and added to the command buffer.
Declaration
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);
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
int
bitmap
Source bitmap object
System.Drawing.Bitmap
diffusion
Random dithertrue … Validfalse … Invalidbool
width
Bitmap width after conversion. (Units : Dots)
int
bothScale
Height is changed according to the conversion rate of the width property.true … Validfalse … Invalidbool
rotation
Rotation.
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.58. AppendBitmapWithAlignment
Print command of the alignment bitmap is generated and added to the command buffer.
Declaration
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);
Parameter
Name
Contents
Type
position
Alignment position
bitmap
Source bitmap object
System.Drawing.Bitmap
diffusion
Random dithertrue … Validfalse … Invalidbool
width
Bitmap width after conversion. (Units : Dots)
int
bothScale
Height is changed according to the conversion rate of the width property.true … Validfalse … Invalidbool
rotation
Rotation.
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.59. AppendBlackMark
Black mark detection command is generated and added to the command buffer.
Declaration
void AppendBlackMark(BlackMarkType type);
Parameter
Name
Contents
Type
type
Black mark detection
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.60. AppendLabel
added in version 1.8.0
Gap detection command for die-cut label paper, etc is generated and added to the command buffer.
Declaration
void AppendLabelType(LabelType type);
Parameter
Name
Contents
Type
type
Gap detection
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.61. BeginPageMode
Begin page mode command is generated and added to the command buffer.
Declaration
void BeginPageMode(Rectangle printRegion, BitmapConverterRotation rotation);
Parameter
Name
Contents
Type
rect
Location and size. (Units : Dots)
Rectangle
rotation
Print direction
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.62. EndPageMode
End page mode command is generated and added to the command buffer.
Declaration
void EndPageMode();
Parameter
None
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.63. AppendPageModeVerticalAbsolutePosition
Vertical absolute position in page mode command is generated and added to the command buffer.
Declaration
void AppendPageModeVerticalAbsolutePosition(int position);
Parameter
Name
Contents
Type
position
Vertical absolute position in page mode. (Units : Dots)
int
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.64. AppendPageModeRotation
Print direction in page mode command is generated and added to the command buffer.
Declaration
void AppendPageModeRotation(BitmapConverterRotation rotation);
Parameter
Name
Contents
Type
rotation
Print direction
Return value
None
Examples
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; }
Refer to ApiFunctions.cs.
4.2.65. AppendPrintableArea
added in version 1.2.0
Set command of the printable area is generated and added to the command buffer.
Declaration
void AppendPrintableArea(PrintableAreaType type);
Parameter
Name
Contents
Type
type
Printable area
Return value
None
Unit:mm
The relationship between the specified PrintableAreaType and the print area to be set is the following.
Model/Emulation |
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] | When 2-inch paper is used, do not set a print area with width 3 inches. |
[2] | When 3-inch paper is used, do not set a print area with width 4 inches. |
[3] | When “Maximum number of lines” is set for the number of memory switch print lines, 72 mm is set for Standard and 50.8 mm is set for Type 3. (Bit 4 of memory switch 4 is set to 1.) |
Note
Examples
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; }
Refer to ApiFunctions.cs.
4.2.66. AppendCjkUnifiedIdeographFont
added in version 1.5.0
A command to set the UTF-8 CJK Unified Ideograph font is generated and added to the command buffer.
Declaration
void AppendCjkUnifiedIdeographFont (params CjkUnifiedIdeographFont[] fonts)
Parameter
Name
Contents
Type
font
CJK Unified Ideograph font in UTF-8When two or more fonts are specified, the font specified earlier is printed first.If nothing is specified for the argument, the font setting of the CJK Unified Ideograph is returned to the memory switch setting.Return value
None
Examples
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")); }
Refer to UTF8MultiLanguageReceiptsImple.cs.
4.2.67. AppendHoldPrint
added in version 1.7.0
A command to specify the hold print control by the printer firmware is generated and added to the command buffer.
Declaration
void AppendHoldPrint(HoldPrintType type);
Parameter
Name
Contents
Type
type
Hold print control
Return value
None
Note
To enable the hold print control
The following settings enable the control of awaiting paper removal ( BeginCheckedBlock method is blocked until paper is removed). See also the Example on next page.
Disable the hold print control by the printer firmware using the command generated by this method.
Enable hold print status using the command generated by the AppendPaperPresentStatus method.
Examples
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
A command to specify hold print status is generated and added to the command buffer.
Declaration
void AppendPaperPresentStatus(PaperPresentStatusType type);
Parameter
Name
Contents
Type
type
Hold print status
Return value
None
Examples
Refer to the example of the AppendHoldPrint method.