4.2. ISCBBuilder
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 |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendData |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendRawData |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendFontStyle |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | ✔ | ✔ | ✔ | ✔ |
appendCodePage |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendInternational |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendLineFeed |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendUnitFeed |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔[1] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendCharacterSpace |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendLineSpace |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendTopMargin |
- | ✔[2][3] | ✔ | - | - | - | ✔ | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
appendEmphasis |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendInvert |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendMultiple |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendMultipleHeight |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendMultipleWidth |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendUnderLine |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendLogo |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[4] | ✔ | ✔[4] | ✔ | ✔[4] | ✔ | ✔[4] | ✔ | ✔[4] | ✔ | ✔ | ✔ | ✔ | ✔ |
appendAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
appendHorizontalTabPosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | ✔ | ✔ | ✔ | ✔ |
appendCutPaper |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔[5] | ✔ | ✔ | ✔[5] | ✔[5] | ✔ |
appendPeripheral |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | - | - | ✔ | ✔ | - | - | ✔ |
appendSound |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | - | - | - | - | - | - | - | - | - | ✔ | ✔ | - | - | ✔ |
appendBarcodeData [6] |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendBarcodeDataWithAbsolutePosition [6] |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendBarcodeDataWithAlignment [6] |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔ | ✔ | ✔ | - |
appendPdf417Data |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendPdf417DataWithAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendPdf417DataWithAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔ | ✔ | ✔ | - |
appendQrCodeData |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendQrCodeDataWithAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - |
appendQrCodeDataWithAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔[7] | ✔ | ✔ | ✔ | ✔ | - |
appendBitmap |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔ | ✔ | ✔ | ✔ |
appendBitmapWithAbsolutePosition |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔[8] | ✔ | ✔ | ✔ | ✔ | ✔ |
appendBitmapWithAlignment |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔[7] | ✔ | ✔ | ✔ | ✔ | ✔ | ✔[7][8] | ✔ | ✔[7][8] | ✔ | ✔[7][8] | ✔ | ✔[7][8] | ✔ | ✔[7][8] | ✔ | ✔ | ✔ | ✔ | ✔ |
appendBlackMark |
- | - | ✔ | - | ✔ | - | - | - | - | - | - | - | - | - | - | - | - | ✔ | ✔ | - | - | - | - | - | - | ✔[9][10] | ✔[11] | ✔[9][10] | ✔[11] | - | ✔ | ✔[9][10] | ✔[10][11] | ✔ |
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.14.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. SCBInitializationType
Initialization constants
Declaration
public enum SCBInitializationType : UInt { case command }
Constants
Name
Contents
command
Command initialization
4.2.2. SCBFontStyleType
Font style constants
Declaration
public enum SCBFontStyleType : UInt { case A case 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. SCBCodePageType
Code Page constants
Declaration
public enum SCBCodePageType : UInt { case CP437 case CP737 case CP772 case CP774 case CP851 case CP852 case CP855 case CP857 case CP858 case CP860 case CP861 case CP862 case CP863 case CP864 case CP865 case CP866 case CP869 case CP874 case CP928 case CP932 case CP998 case CP999 case CP1001 case CP1250 case CP1251 case CP1252 case CP2001 case CP3001 case CP3002 case CP3011 case CP3012 case CP3021 case CP3041 case CP3840 case CP3841 case CP3843 case CP3844 case CP3845 case CP3846 case CP3847 case CP3848 case UTF8 case 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. SCBInternationalType
International character constants
Declaration
public enum SCBInternationalType : UInt { case USA case france case germany case UK case denmark case sweden case italy case spain case japan case norway case denmark2 case spain2 case latinAmerica case korea case ireland case india case 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. SCBLogoSize
Logo size constants
Declaration
public enum SCBLogoSize : UInt { case normal case doubleWidth case doubleHeight case doubleWidthDoubleHeight }
Constants
Name
Contents
normal
Normal
doubleWidth
Double Width
doubleHeight
Double Height
doubleWidthDoubleHeight
Double Width / Height
4.2.6. SCBAlignmentPosition
Alignment position constants
Declaration
public enum SCBAlignmentPosition : Int { case left case center case right }
Constants
Name
Contents
left
Left alignment
center
Center alignment
right
Right alignment
4.2.7. SCBCutPaperAction
Paper cut constants
Declaration
public enum SCBCutPaperAction : Int { case fullCut case partialCut case fullCutWithFeed case partialCutWithFeed case 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. SCBPeripheralChannel
Cash drawer channel constants
Declaration
public enum SCBPeripheralChannel : Int { case no1 case no2 }
Constants
Name
Contents
no1
Channel1
no2
Channel2
4.2.9. SCBSoundChannel
Sound/Buzzer channel constants
Declaration
public enum SCBSoundChannel : Int { case no1 case no2 }
Constants
Name
Contents
no1
Channel1
no2
Channel2
4.2.10. SCBBarcodeSymbology
Barcode symbology constants
Declaration
public enum SCBBarcodeSymbology : UInt { case UPCE case UPCA case JAN8 case JAN13 case code39 case ITF case code128 case code93 case 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. SCBBarcodeWidth
Barcode width constants
By specifying ExtMode, the barcode mode conforming to each command specification is set.
Declaration
public enum SCBBarcodeWidth : UInt { case mode1 case mode2 case mode3 case mode4 case mode5 case mode6 case mode7 case mode8 case mode9 case extMode1 case extMode2 case extMode3 case extMode4 case extMode5 case extMode6 case extMode7 case extMode8 case extMode9 }
Constants
Name
Contents
Library version
mode1
Mode1
1.3.0+ mode2
Mode2
1.3.0+ mode3
Mode3
1.3.0+ mode4
Mode4
1.3.0+ mode5
Mode5
1.3.0+ mode6
Mode6
1.3.0+ mode7
Mode7
1.3.0+ mode8
Mode8
1.3.0+ mode9
Mode9
1.3.0+ extMode1
ExtMode1
1.13.0+ extMode2
ExtMode2
1.13.0+ extMode3
ExtMode3
1.13.0+ extMode4
ExtMode4
1.13.0+ extMode5
ExtMode5
1.13.0+ extMode6
ExtMode6
1.13.0+ extMode7
ExtMode7
1.13.0+ extMode8
ExtMode8
1.13.0+ extMode9
ExtMode9
1.13.0+
4.2.12. SCBPdf417Level
PDF417 ECC (security level) constants
Declaration
public enum SCBPdf417Level : UInt { case ECC0 case ECC1 case ECC2 case ECC3 case ECC4 case ECC5 case ECC6 case ECC7 case 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. SCBQrCodeModel
QR code model constants
Declaration
public enum SCBQrCodeModel : UInt { case no1 case no2 }
Constants
Name
Contents
no1
Model1
no2
Model2
4.2.14. SCBQrCodeLevel
QR code mistake correction level constants
Declaration
public enum SCBQrCodeLevel : UInt case L case M case Q case H }
Constants
Name
Contents
L
Level L
M
Level M
Q
Level Q
H
Level H
4.2.15. SCBBitmapConverterRotation
Bitmap rotation constants
Declaration
public enum SCBBitmapConverterRotation : Int { case normal case right90 case left90 case rotate180 }
Constants
Name
Contents
normal
Rotated 0
right90
Rotated 90
left90
Rotated 270
rotate180
Rotated 180
4.2.16. SCBBlackMarkType
added in version 1.6.0
Black mark detection constants
Declaration
public enum SCBBlackMarkType : Int { case invalid case valid case 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. SCBLabelType
added in version 1.17.0
Gap detection constants for die-cut label paper, etc
Declaration
public enum SCBLabelType : Int { case invalid case valid case validWithDetection }
Constants
Name
Contents
invalid
Gap detection invalid
valid
Gap detection valid
validWithDetection
Gap detection valid with detect at power on
4.2.18. SCBPrintableAreaType
added in version 1.9.0
Printable area constants
Declaration
public enum SCBPrintableAreaType : Int { case standard case type1 case type2 case type3 case type4 }
Constants
Name
Contents
standard
Standard type
type1
Type1
type2
Type2
type3
Type3
type4
Type4
4.2.19. SCBCjkUnifiedIdeographFont
added in version 1.13.0
Constants of CJK Unified Ideograph font in UTF-8
Declaration
public enum SCBCjkUnifiedIdeographFont : Int { case japanese case simplifiedChinese case traditionalChinese case hangul }
Constants
Name
Contents
japanese
Japanese font
simplifiedChinese
Simplified Chinese font
traditionalChinese
Traditional Chinese font
hangul
Hangul font
4.2.20. SCBHoldPrintType
added in version 1.15.0
Constants to specify the hold print control
Declaration
public enum SCBHoldPrintType : Int { case invalid = 1 case valid = 2 case `default` = 3 }
Constants
Name
Contents
invalid
Invalid
valid
Valid
default
Follow the memory switch setting
4.2.21. SCBPaperPresentStatusType
added in version 1.15.0
Hold print status constants
Declaration
public enum SCBPaperPresentStatusType : Int { case invalid = 1 case valid = 2 case `default` = 3 }
Constants
Name
Contents
invalid
Invalid
valid
Valid
default
Follow the memory switch setting
4.2.22. commands
Gets the command buffer.
Declaration
open var commands: NSMutableData! { get }
Parameter
None
Return value
Contents
Type
Command buffer
NSMutableData
4.2.23. beginDocument
Begin document command is generated and added to the command buffer.
Declaration
open func beginDocument()
Parameter
None
Return value
None
4.2.24. endDocument
End document command is generated and added to the command buffer.
Declaration
open func endDocument()
Parameter
None
Return value
None
4.2.25. appendInitialization
Initialization command is generated and added to the command buffer.
Declaration
open func append(_ type: SCBInitializationType)
Parameter
Name
Contents
Type
type
Initialization type
Return value
None
4.2.26. appendData
Data (Text and Command) is added to the command buffer.
Declaration
open func appendByte(_ data: UInt8) open func append(_ otherData: Data!) open func appendBytes(_ bytes: UnsafeRawPointer!, length: UInt)
Parameter
Name
Contents
Type
dataotherDatabytesData (Text and Command)
UInt8DataUnsafeRawPointerlength
Data length
UInt
Return value
None
4.2.27. appendRawData
Raw data (Text and Command) is added to the command buffer.
Declaration
open func appendRawByte(_ data: UInt8) open func appendRawData(_ otherData: Data!) open func appendRawBytes(_ bytes: UnsafeRawPointer!, length: UInt)
Parameter
Name
Contents
Type
dataotherDatabytesRaw data (Text and Command)
UInt8DataUnsafeRawPointerlength
Data length
UInt
Return value
None
4.2.28. appendFontStyle
Select command of the font style is generated and added to the command buffer.
Declaration
open func append(_ type: SCBFontStyleType)
Parameter
Name
Contents
Type
type
Font style
Return value
None
4.2.29. appendCodePage
Select command of the code page is generated and added to the command buffer.
Declaration
open func append(_ type: SCBCodePageType)
Parameter
Name
Contents
Type
type
Code Page
Return value
None
4.2.30. appendInternational
Select command of the international character mode is generated and added to the command buffer.
Declaration
open func append(_ type: SCBInternationalType)
Parameter
Name
Contents
Type
type
International character
Return value
None
4.2.31. appendLineFeed
Line feed command is generated and added to the command buffer.
Declaration
open func appendLineFeed() open func appendData(withLineFeed otherData: Data!) open func appendBytes(withLineFeed bytes: UnsafeRawPointer!, length: UInt) open func appendLineFeed(_ line: Int) open func appendData(withLineFeed otherData: Data!, line: Int) open func appendBytes(withLineFeed bytes: UnsafeRawPointer!, length: UInt, line: Int)
Parameter
Name
Contents
Type
line
Paper feed units. (Units : Lines)
Int
otherDatabytesData (Text and Command)
DataUnsafeRawPointerlength
Data length
UInt
Return value
None
4.2.32. appendUnitFeed
Unit feed command is generated and added to the command buffer.
Declaration
open func appendUnitFeed(_ unit: Int) open func appendData(withUnitFeed otherData: Data!, unit: Int) open func appendBytes(withUnitFeed bytes: UnsafeRawPointer!, length: UInt, unit: Int)
Parameter
Name
Contents
Type
unit
Paper feed units. (Units : Dots)
Int
otherDatabytesData (Text and Command)
DataUnsafeRawPointerlength
Data length
UInt
Return value
None
4.2.33. appendCharacterSpace
Set command of the character space is generated and added to the command buffer.
Declaration
open func appendCharacterSpace(_ space: Int)
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.
4.2.34. appendLineSpace
Set command of the line space is generated and added to the command buffer.
Declaration
open func appendLineSpace(_ lineSpace: Int)
Parameter
Name
Contents
Type
lineSpace
Line spaces. (Units : Dots)
Int
Return value
None
4.2.35. appendTopMargin
added in version 1.9.0
Set command of the top margin is generated and added to the command buffer.
Declaration
open func appendTopMargin(_ topMargin: Int)
Parameter
Name
Contents
Type
margin
Top margin. (Units : Millimeter)
Int
Return value
None
4.2.36. appendEmphasis
Select command of the emphasis mode is generated and added to the command buffer.
Declaration
open func appendEmphasis(_ emphasis: Bool) open func appendData(withEmphasis otherData: Data!) open func appendBytes(withEmphasis bytes: UnsafeRawPointer!, length: UInt)
Parameter
Name
Contents
Type
emphasis
Emphasistrue … Validfalse … InvalidBool
otherDatabytesData (Text and Command)
DataUnsafeRawPointerlength
Data length
UInt
Return value
None
4.2.37. appendInvert
Select command of the invert mode is generated and added to the command buffer.
Declaration
open func appendInvert(_ invert: Bool) open func appendData(withInvert otherData: Data!) open func appendBytes(withInvert bytes: UnsafeRawPointer!, length: UInt)
Parameter
Name
Contents
Type
invert
Inverttrue … Validfalse … InvalidBool
otherDatabytesData (Text and Command)
DataUnsafeRawPointerlength
Data length
UInt
Return value
None
4.2.38. appendMultiple
Select command of the multiple mode is generated and added to the command buffer.
Declaration
open func appendMultiple(_ width: Int, height: Int) open func appendData(withMultiple otherData: Data!, width: Int, height: Int) open func appendBytes(withMultiple bytes: UnsafeRawPointer!, length: UInt, width: Int, height: Int) open func appendMultipleHeight(_ height: Int) open func appendData(withMultipleHeight otherData: Data!, height: Int) open func appendBytes(withMultipleHeight bytes: UnsafeRawPointer!, length: UInt, height: Int) open func appendMultipleWidth(_ width: Int) open func appendData(withMultipleWidth otherData: Data!, width: Int) open func appendBytes(withMultipleWidth bytes: UnsafeRawPointer!, length: UInt, width: Int)
Parameter
Name
Contents
Type
width
Expanded width
Int
height
Expanded height
Int
otherDatabytesData (Text and Command)
DataUnsafeRawPointerlength
Data length
UInt
Return value
None
4.2.39. appendUnderLine
Select command of the underline mode is generated and added to the command buffer.
Declaration
open func appendUnderLine(_ underLine: Bool) open func appendData(withUnderLine otherData: Data!) open func appendBytes(withUnderLine bytes: UnsafeRawPointer!, length: UInt)
Parameter
Name
Contents
Type
underLine
Under linetrue … Validfalse … InvalidBool
otherDatabytesData (Text and Command)
DataUnsafeRawPointerlength
Data length
UInt
Return value
None
4.2.40. appendLogo
Print command of the logo is generated and added to the command buffer.
Declaration
open func appendLogo(_ size: SCBLogoSize, number: Int)
Parameter
Name
Contents
Type
size
Logo size
number
Logo number
Int
Return value
None
4.2.41. appendAbsolutePosition
Absolute position command is generated and added to the command buffer.
Declaration
open func appendAbsolutePosition(_ position: Int) open func appendData(withAbsolutePosition otherData: Data!, position: Int) open func appendBytes(withAbsolutePosition bytes: UnsafeRawPointer!, length: UInt, position: Int)
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
Int
otherDatabytesData (Text and Command)
DataUnsafeRawPointerlength
Data length
UInt
Return value
None
4.2.42. appendAlignment
Alignment command is generated and added to the command buffer.
Declaration
open func appendAlignment(_ position: SCBAlignmentPosition) open func appendData(withAlignment otherData: Data!, position: SCBAlignmentPosition) open func appendBytes(withAlignment bytes: UnsafeRawPointer!, length: UInt, position: SCBAlignmentPosition)
Parameter
Name
Contents
Type
position
Alignment position
otherDatabytesData (Text and Command)
DataUnsafeRawPointerlength
Data length
UInt
Return value
None
Important
This method cannot be used with appendBitmap, appendBarcodeData, appendQrCodeData and appendPdf417Data for alignment. Instead, please use appendBitmapWithAlignment, appendBarcodeDataWithAlignment, appendQrCodeDataWithAlignment and appendPdf417DataWithAlignment respectively.
4.2.43. appendHorizontalTabPosition
added in version 1.8.0
Horizontal tab set/clear command is generated and added to the command buffer.
Declaration
open func appendHorizontalTabPosition(_ positions: [NSNumber]!)
Parameter
Name
Contents
Type
positions
Array of horizontal tab positions (Units: ANK character pitch)Specifying nil or empty array deletes all currently set horizontal tab positions.[NSNumber]
Return value
None
4.2.44. appendCutPaper
Line feed and Paper cut commands are generated and added to the command buffer.
Declaration
open func appendCutPaper(_ action: SCBCutPaperAction)
Parameter
Name
Contents
Type
action
Paper cut
Return value
None
Note
4.2.45. appendPeripheral
Cash drawer command is generated and added to the command buffer.
Declaration
open func appendPeripheral(_ channel: SCBPeripheralChannel) open func appendPeripheral(_ channel: SCBPeripheralChannel, time: Int)
Parameter
Name
Contents
Type
channel
Cash drawer channel
time
Drive time. (Units : mSec)* Peripheral channel1 only.Int
Return value
None
4.2.46. appendSound
Sound/Buzzer command is generated and added to the command buffer.
Declaration
open func appendSound(_ channel: SCBSoundChannel) open func appendSound(_ channel: SCBSoundChannel, repeat: Int) open func appendSound(_ channel: SCBSoundChannel, repeat: Int, driveTime: Int, delayTime: Int)
Parameter
Name
Contents
Type
Library version
channel Sound/Buzzer channel
1.3.0+ repeat Repeat count
Int
1.3.0+ driveTime Drive time. (Units : mSec)
Int
1.9.0+ delayTime Delay time. (Units : mSec)
Int
1.9.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.
4.2.47. appendBarcodeData
Print command of the barcode is generated and added to the command buffer.
Declaration
open func appendBarcodeData(_ otherData: Data!, symbology: SCBBarcodeSymbology, width: SCBBarcodeWidth, height: Int, hri: Bool) open func appendBarcodeBytes(_ bytes: UnsafeRawPointer!, length: UInt, symbology: SCBBarcodeSymbology, width: SCBBarcodeWidth, height: Int, hri: Bool)
Parameter
Name
Contents
Type
otherDatabytesBarcode data
DataUnsafeRawPointerlength
Data length
UInt
symbology
Barcode symbology
width
Barcode width
height
Barcode height. (Units : Dots)
Int
hri
Under-bar characterstrue … Validfalse … InvalidBool
Return value
None
4.2.48. appendBarcodeDataWithAbsolutePosition
Print command of the absolute position barcode is generated and added to the command buffer.
Declaration
open func appendBarcodeData(withAbsolutePosition otherData: Data!, symbology: SCBBarcodeSymbology, width: SCBBarcodeWidth, height: Int, hri: Bool, position: Int) open func appendBarcodeBytes(withAbsolutePosition bytes: UnsafeRawPointer!, length: UInt, symbology: SCBBarcodeSymbology, width: SCBBarcodeWidth, height: Int, hri: Bool, position: Int)
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
Int
otherDatabytesBarcode data
DataUnsafeRawPointerlength
Data length
UInt
symbology
Barcode symbology
width
Barcode width
height
Barcode height. (Units : Dots)
Int
hri
Under-bar characterstrue … Validfalse … InvalidBool
Return value
None
4.2.49. appendBarcodeDataWithAlignment
Print command of the alignment barcode is generated and added to the command buffer.
Declaration
open func appendBarcodeData(withAlignment otherData: Data!, symbology: SCBBarcodeSymbology, width: SCBBarcodeWidth, height: Int, hri: Bool, position: SCBAlignmentPosition) open func appendBarcodeBytes(withAlignment bytes: UnsafeRawPointer!, length: UInt, symbology: SCBBarcodeSymbology, width: SCBBarcodeWidth, height: Int, hri: Bool, position: SCBAlignmentPosition)
Parameter
Name
Contents
Type
position
Alignment position
otherDatabytesBarcode data
DataUnsafeRawPointerlength
Data length
UInt
symbology
Barcode symbology
width
Barcode width
height
Barcode height. (Units : Dots)
Int
hri
Under-bar characterstrue … Validfalse … InvalidBool
Return value
None
4.2.50. appendPdf417Data
Print command of the PDF417 is generated and added to the command buffer.
Declaration
open func appendPdf417Data(_ otherData: Data!, line: Int, column: Int, level: SCBPdf417Level, module: Int, aspect: Int) open func appendPdf417Bytes(_ bytes: UnsafeRawPointer!, length: UInt, line: Int, column: Int, level: SCBPdf417Level, module: Int, aspect: Int)
Parameter
Name
Contents
Type
otherDatabytesPDF417 data
DataUnsafeRawPointerlength
Data length
UInt
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
4.2.51. appendPdf417DataWithAbsolutePosition
Print command of the absolute position PDF417 is generated and added to the command buffer.
Declaration
open func appendPdf417Data(withAbsolutePosition otherData: Data!, line: Int, column: Int, level: SCBPdf417Level, module: Int, aspect: Int, position: Int) open func appendPdf417Bytes(withAbsolutePosition bytes: UnsafeRawPointer!, length: UInt, line: Int, column: Int, level: SCBPdf417Level, module: Int, aspect: Int, position: Int)
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
Int
otherDatabytesPDF417 data
DataUnsafeRawPointerlength
Data length
UInt
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
4.2.52. appendPdf417DataWithAlignment
Print command of the alignment PDF417 is generated and added to the command buffer.
Declaration
open func appendPdf417Data(withAlignment otherData: Data!, line: Int, column: Int, level: SCBPdf417Level, module: Int, aspect: Int, position: SCBAlignmentPosition) open func appendPdf417Bytes(withAlignment bytes: UnsafeRawPointer!, length: UInt, line: Int, column: Int, level: SCBPdf417Level, module: Int, aspect: Int, position: SCBAlignmentPosition)
Parameter
Name
Contents
Type
position
Alignment position
otherDatabytesPDF417 data
DataUnsafeRawPointerlength
Data length
UInt
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
4.2.53. appendQrCodeData
Print command of the QR code is generated and added to the command buffer.
Declaration
open func appendQrCodeData(_ otherData: Data!, model: SCBQrCodeModel, level: SCBQrCodeLevel, cell: Int) open func appendQrCodeBytes(_ bytes: UnsafeRawPointer!, length: UInt, model: SCBQrCodeModel, level: SCBQrCodeLevel, cell: Int)
Parameter
Name
Contents
Type
otherDatabytesQR code data
DataUnsafeRawPointerlength
Data length
UInt
model
QR code model
level
QR code mistake correction level
cell
QR code cell size
Int
Return value
None
4.2.54. appendQrCodeDataWithAbsolutePosition
Print command of the absolute position QR code is generated and added to the command buffer.
Declaration
open func appendQrCodeData(withAbsolutePosition otherData: Data!, model: SCBQrCodeModel, level: SCBQrCodeLevel, cell: Int, position: Int) open func appendQrCodeBytes(withAbsolutePosition bytes: UnsafeRawPointer!, length: UInt, model: SCBQrCodeModel, level: SCBQrCodeLevel, cell: Int, position: Int)
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
Int
otherDatabytesQR code data
DataUnsafeRawPointerlength
Data length
UInt
model
QR code model
level
QR code mistake correction level
cell
QR code cell size
Int
Return value
None
4.2.55. appendQrCodeDataWithAlignment
Print command of the alignment QR code is generated and added to the command buffer.
Declaration
open func appendQrCodeData(withAlignment otherData: Data!, model: SCBQrCodeModel, level: SCBQrCodeLevel, cell: Int, position: SCBAlignmentPosition) open func appendQrCodeBytes(withAlignment bytes: UnsafeRawPointer!, length: UInt, model: SCBQrCodeModel, level: SCBQrCodeLevel, cell: Int, position: SCBAlignmentPosition)
Parameter
Name
Contents
Type
position
Alignment position
otherDatabytesQR code data
DataUnsafeRawPointerlength
Data length
UInt
model
QR code model
level
QR code mistake correction level
cell
QR code cell size
Int
Return value
None
4.2.56. appendBitmap
Print command of the bitmap is generated and added to the command buffer.
Declaration
open func appendBitmap(_ image: Any!, diffusion: Bool, width: Int, bothScale: Bool, rotation: SCBBitmapConverterRotation) open func appendBitmap(_ image: Any!, diffusion: Bool, rotation: SCBBitmapConverterRotation) open func appendBitmap(_ image: Any!, diffusion: Bool, width: Int, bothScale: Bool) open func appendBitmap(_ image: Any!, diffusion: Bool)
Parameter
Name
Contents
Type
bitmap
Source bitmap object
UIImage
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
4.2.57. appendBitmapWithAbsolutePosition
Print command of the absolute position bitmap is generated and added to the command buffer.
Declaration
open func appendBitmap(withAbsolutePosition image: Any!, diffusion: Bool, width: Int, bothScale: Bool, rotation: SCBBitmapConverterRotation, position: Int) open func appendBitmap(withAbsolutePosition image: Any!, diffusion: Bool, rotation: SCBBitmapConverterRotation, position: Int) open func appendBitmap(withAbsolutePosition image: Any!, diffusion: Bool, width: Int, bothScale: Bool, position: Int) open func appendBitmap(withAbsolutePosition image: Any!, diffusion: Bool, position: Int)
Parameter
Name
Contents
Type
position
Absolute position. (Units : Dots)
Int
bitmap
Source bitmap object
UIImage
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
4.2.58. appendBitmapWithAlignment
Print command of the alignment bitmap is generated and added to the command buffer.
Declaration
open func appendBitmap(withAlignment image: Any!, diffusion: Bool, width: Int, bothScale: Bool, rotation: SCBBitmapConverterRotation, position: SCBAlignmentPosition) open func appendBitmap(withAlignment image: Any!, diffusion: Bool, rotation: SCBBitmapConverterRotation, position: SCBAlignmentPosition) open func appendBitmap(withAlignment image: Any!, diffusion: Bool, width: Int, bothScale: Bool, position: SCBAlignmentPosition) open func appendBitmap(withAlignment image: Any!, diffusion: Bool, position: SCBAlignmentPosition)
Parameter
Name
Contents
Type
position
Alignment position
bitmap
Source bitmap object
UIImage
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
4.2.59. appendBlackMark
added in version 1.6.0
Black mark detection command is generated and added to the command buffer.
Declaration
open func append(_ type: SCBBlackMarkType)
Parameter
Name
Contents
Type
type
Black mark detection
Return value
None
4.2.60. appendLabel
added in version 1.17.0
Gap detection command for die-cut label paper, etc is generated and added to the command buffer.
Declaration
open func append(_ type: SCBLabelType)
Parameter
Name
Contents
Type
type
Gap detection
Return value
None
4.2.61. beginPageMode
added in version 1.6.0
Begin page mode command is generated and added to the command buffer.
Declaration
open func beginPageMode(_ rect: CGRect, rotation: SCBBitmapConverterRotation)
Parameter
Name
Contents
Type
rect
Location and size. (Units : Dots)
CGRect
rotation
Print direction
Return value
None
4.2.62. endPageMode
added in version 1.6.0
End page mode command is generated and added to the command buffer.
Declaration
open func endPageMode()
Parameter
None
Return value
None
4.2.63. appendPageModeVerticalAbsolutePosition
added in version 1.6.0
Vertical absolute position in page mode command is generated and added to the command buffer.
Declaration
open func appendPageModeVerticalAbsolutePosition(_ position: Int)
Parameter
Name
Contents
Type
position
Vertical absolute position in page mode. (Units : Dots)
Int
Return value
None
4.2.64. appendPageModeRotation
added in version 1.6.0
Print direction in page mode command is generated and added to the command buffer.
Declaration
open func appendPageModeRotation(_ rotation: SCBBitmapConverterRotation)
Parameter
Name
Contents
Type
rotation
Print direction
Return value
None
4.2.65. appendPrintableArea
added in version 1.9.0
Set command of the printable area is generated and added to the command buffer.
Declaration
open func append(_ type: SCBPrintableAreaType)
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
4.2.66. appendCjkUnifiedIdeographFont
added in version 1.13.0
A command to set the UTF-8 CJK Unified Ideograph font is generated and added to the command buffer.
Declaration
open func appendCjkUnifiedIdeographFont(_ fonts: [NSNumber]!)
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
4.2.67. appendHoldPrint
added in version 1.15.0
A command to specify the hold print control by the printer firmware is generated and added to the command buffer.
Declaration
open func append(_ type: SCBHoldPrintType)
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
static func createHoldPrintData(_ emulation: StarIoExtEmulation, isHoldArray: [Bool]) -> [Data] { var commandArray : [Data] = []; for i in 0..<isHoldArray.count { let builder: ISCBBuilder = StarIoExt.createCommandBuilder(emulation) builder.beginDocument() // Disable hold print controlled by printer firmware. builder.append(SCBHoldPrintType.invalid) if isHoldArray[i] { // Enable paper present status if wait paper removal before next printing. builder.append(SCBPaperPresentStatusType.valid) } else { // Disable paper present status if do not wait paper removal before next printing. builder.append(SCBPaperPresentStatusType.invalid) } // Create commands for printing. builder.appendAlignment(SCBAlignmentPosition.center) builder.append(("\n------------------------------------\n\n\n\n\n\n").data(using: String.Encoding.ascii)) builder.appendMultiple(3, height: 3) builder.append(("Page ").data(using: String.Encoding.ascii)) builder.append((String(i + 1)).data(using: String.Encoding.ascii)) builder.appendMultiple(1, height: 1) builder.append(("\n\n\n\n\n----------------------------------\n").data(using: String.Encoding.ascii)) builder.appendCutPaper(SCBCutPaperAction.partialCutWithFeed) builder.endDocument() commandArray.append(builder.commands.copy() as! Data) } return commandArray; }
4.2.68. appendPaperPresentStatus
added in version 1.15.0
A command to specify hold print status is generated and added to the command buffer.
Declaration
open func append(_ type: SCBPaperPresentStatusType)
Parameter
Name
Contents
Type
type
Hold print status
Return value
None
Examples
Refer to the example of the appendHoldPrint method.