4.2. ICommandBuilder

Provides a function to generate printer control commands.

  • Property

    Name

    Contents

    Commands

    Generated commands.

  • Method

    Name

    Contents

    BeginDocument

    Begin document command is generated and added to the command buffer.

    EndDocument

    End document command is generated and added to the command buffer.

    AppendInitialization

    Initialization command is generated and added to the command buffer.

    Append

    Data (Text and Command) is added to the command buffer.

    AppendRaw

    Raw data (Text and Command) is added to the command buffer.

    AppendFontStyle

    Select command of the font style is generated and added to the command buffer.

    AppendCodePage

    Select command of the code page is generated and added to the command buffer.

    AppendInternational

    Select command of the international character mode is generated and added to the command buffer.

    AppendLineFeed

    Line feed command is generated and added to the command buffer.

    AppendUnitFeed

    Unit feed command is generated and added to the command buffer.

    AppendCharacterSpace

    Set command of the character space is generated and added to the command buffer.

    AppendLineSpace

    Set command of the line space is generated and added to the command buffer.

    AppendTopMargin

    Set command of the top margin is generated and added to the command buffer.

    AppendEmphasis

    Select command of the emphasis mode is generated and added to the command buffer.

    AppendInvert

    Select command of the invert mode is generated and added to the command buffer.

    AppendMultiple

    Select command of the multiple mode is generated and added to the command buffer.

    AppendUnderLine

    Select command of the underline mode is generated and added to the command buffer.

    AppendLogo

    Print command of the logo is generated and added to the command buffer.

    AppendAbsolutePosition

    Absolute position command is generated and added to the command buffer.

    AppendAlignment

    Alignment command is generated and added to the command buffer.

    AppendHorizontalTabPosition

    Generates a clear command, and then adds it to the command buffer.

    AppendCutPaper

    Paper cut command is generated and added to the command buffer.

    AppendPeripheral

    Cash drawer command is generated and added to the command buffer.

    AppendSound

    Sound/Buzzer command is generated and added to the command buffer.

    AppendBarcode

    Print command of the barcode is generated and added to the command buffer.

    AppendBarcodeWithAbsolutePosition

    Print command of the absolute position barcode is generated and added to the command buffer.

    AppendBarcodeWithAlignment

    Print command of the alignment barcode is generated and added to the command buffer.

    AppendPdf417

    Print command of the PDF417 is generated and added to the command buffer.

    AppendPdf417WithAbsolutePosition

    Print command of the absolute position PDF417 is generated and added to the command buffer.

    AppendPdf417WithAlignment

    Print command of the alignment PDF417 is generated and added to the command buffer.

    AppendQrCode

    Print command of the QR code is generated and added to the command buffer.

    AppendQrCodeWithAbsolutePosition

    Print command of the absolute position QR code is generated and added to the command buffer.

    AppendQrCodeWithAlignment

    Print command of the alignment QR code is generated and added to the command buffer.

    AppendBitmap

    Print command of the bitmap is generated and added to the command buffer.

    AppendBitmapWithAbsolutePosition

    Print command of the absolute position bitmap is generated and added to the command buffer.

    AppendBitmapWithAlignment

    Print command of the alignment bitmap is generated and added to the command buffer.

    AppendBlackMark

    Black mark command is generated and added to the command buffer.

    BeginPageMode

    Begin page mode command is generated and added to the command buffer.

    EndPageMode

    End page mode command is generated and added to the command buffer.

    AppendPageModeVerticalAbsolutePosition

    Vertical absolute position in page mode command is generated and added to the command buffer.

    AppendPageModeRotation

    Print direction in page mode command is generated and added to the command buffer.

    AppendPrintableArea

    Set command of the printable area is generated and added to the command buffer.

    AppendCjkUnifiedIdeographFont

    A command to set the UTF-8 CJK Unified Ideograph font is generated and added to the command buffer.

    AppendHoldPrint

    A command to specify the hold print control by the printer firmware is generated and added to the command buffer.

    AppendPaperPresentStatus

    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 mPOP FVP10 TSP100IIIW TSP100IIIBITSP100IIIU TSP100ECO TSP100U TSP100GTTSP100LAN TSP650II TSP650IISK TSP700II TSP800IISM-S210i SM-S220i SM-S230i SM-T300i/T300 SM-T400i BSC10 SM-L200 SM-L300 SP700
StarPRNT StarPRNT StarPRNT StarLine StarGraphic StarGraphic StarGraphic StarGraphic StarGraphic StarGraphic StarGraphic StarLine StarLine StarLine StarLine StarPRNT EscPosMobile StarPRNT EscPosMobile StarPRNT EscPosMobile StarPRNT EscPosMobile StarPRNT EscPosMobile EscPos StarPRNT StarPRNT StarDotImpact

BeginDocument

EndDocument

AppendInitialization

- - - - - - -

Append

- - - - - - -

AppendRaw

AppendFontStyle

- - - - - - - - - - - -

AppendCodePage

- - - - - - -

AppendInternational

- - - - - - -

AppendLineFeed

- - - - - - -

AppendUnitFeed

[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] -

AppendPdf417

-

AppendPdf417WithAbsolutePosition

-

AppendPdf417WithAlignment

[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] -

AppendBitmap

[8] [8] [8] [8] [8]

AppendBitmapWithAbsolutePosition

[8] [8] [8] [8] [8]

AppendBitmapWithAlignment

[7] [7] [7] [7] [7] [7] [7] [7][8] [7][8] [7][8] [7][8] [7][8]

AppendBlackMark

- - - - - - - - - - - - - - - - - - [9][10] [11] [9][10] [11] [9][10] [10][11]

BeginPageMode

- - - - - - - - - -

EndPageMode

- - - - - - - - - -

AppendPageModeVerticalAbsolutePosition

- - - - - - - - - -

AppendPageModeRotation

- - - - - - - - - -

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.

[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.

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,
        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
    Legal Legal

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
    }
    
  • Constants

    Name Contents
    FullCut Full Cut
    PartialCut Partial Cut
    FullCutWithFeed Full Cut with Feed
    PartialCutWithFeed Partial Cut with Feed

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 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 constants

  • Declaration

    public enum BlackMarkType {
        Invalid,
        Valid,
        ValidWithDetection
    }
    
  • Constants

    Name Contents
    Invalid Black mark invalid
    Valid Black mark valid
    ValidWithDetection Black mark valid with detection

4.2.17. 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.18. 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.19. 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.20. 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.21. 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.22. 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.23. 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.24. AppendInitialization

Initialization command is generated and added to the command buffer.

  • Declaration

    void appendInitialization(InitializationType type);
    
  • Parameter

    Name Contents Type
    type Initialization type InitializationType
  • 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.25. 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)
    byte
    byte[]
  • 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.26. 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)
    byte
    byte[]
  • Return value

    None

  • Examples

    public static byte[] CreateRasterReceiptData(Emulation emulation, LocalizeReceipt localizeReceipt, int width, bool receipt, bool info, bool qrCode)
    {
        Bitmap image = localizeReceipt.CreateRasterReceiptImage();
    
        byte[] urlData = SMCSAllReceipts.UploadBitmap(image);
    
        ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument();
    
        byte[] allReceiptsData = SMCSAllReceipts.GenerateAllReceipts(urlData, emulation, info, qrCode);
        builder.AppendRaw(allReceiptsData);
    
        builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument();
    
        return builder.Commands;
    }
    

    Refer to AllReceiptsFunctions.m.

4.2.27. 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 FontStyleType
  • 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.28. 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 CodePageType
  • 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.29. 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 InternationalType
  • 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.30. 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.31. 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.32. 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.33. 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.34. 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.35. 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
    Emphasis
    true … Valid
    false … Invalid
    bool
    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.36. 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
    Invert
    true … Valid
    false … Invalid
    bool
    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.37. 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.38. 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 line
    true … Valid
    false … Invalid
    bool
    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. 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.41. 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 AlignmentPosition
    data Data (Text and Command) byte[]
  • Return value

    None

Important

“appendAlignment” cannot be used with AppendBitmap . Therefore, please use AppendBitmapWithAlignment if you would like to adjust bitmap position.

  • 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.42. 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.43. AppendCutPaper

Paper cut command is generated and added to the command buffer.

  • Declaration

    void AppendCutPaper(CutPaperAction action);
    
  • Parameter

    Name Contents Type
    action Paper cut CutPaperAction
  • 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.44. 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 PeripheralChannel
    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.45. 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

    SoundChannel

    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

  • 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.46. 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 BarcodeSymbology
    width Barcode width BarcodeWidth
    height Barcode height. (Units : Dots) int
    hri
    Under-bar characters
    true … Valid
    false … Invalid
    bool
  • 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.47. 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 BarcodeSymbology
    width Barcode width BarcodeWidth
    height Barcode height. (Units : Dots) int
    hri
    Under-bar characters
    true … Valid
    false … Invalid
    bool
  • 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.48. 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 AlignmentPosition
    data Barcode data byte[]
    symbology Barcode symbology BarcodeSymbology
    width Barcode width BarcodeWidth
    height Barcode height. (Units : Dots) int
    hri
    Under-bar characters
    true … Valid
    false … Invalid
    bool
  • 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.49. 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) Pdf417Level
    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.50. 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) Pdf417Level
    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.51. 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 AlignmentPosition
    data PDF417 data byte[]
    line Number of lines int
    column Number of columns int
    level PDF417 ECC (security level) Pdf417Level
    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.52. 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 QrCodeModel
    level QR code mistake correction level QrCodeLevel
    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.53. 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 QrCodeModel
    level QR code mistake correction level QrCodeLevel
    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.54. 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 AlignmentPosition
    data QR code data byte[]
    model QR code model QrCodeModel
    level QR code mistake correction level QrCodeLevel
    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.55. 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 dither
    true … Valid
    false … Invalid
    bool
    width Bitmap width after conversion. (Units : Dots) int
    bothScale
    Height is changed according to the conversion rate of the width property.
    true … Valid
    false … Invalid
    bool
    rotation Rotation. BitmapConverterRotation
  • 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.56. 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 dither
    true … Valid
    false … Invalid
    bool
    width Bitmap width after conversion. (Units : Dots) int
    bothScale
    Height is changed according to the conversion rate of the width property.
    true … Valid
    false … Invalid
    bool
    rotation Rotation. BitmapConverterRotation
  • 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.57. 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 AlignmentPosition
    bitmap Source bitmap object System.Drawing.Bitmap
    diffusion
    Random dither
    true … Valid
    false … Invalid
    bool
    width Bitmap width after conversion. (Units : Dots) int
    bothScale
    Height is changed according to the conversion rate of the width property.
    true … Valid
    false … Invalid
    bool
    rotation Rotation. BitmapConverterRotation
  • 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.58. AppendBlackMark

Black mark command is generated and added to the command buffer.

  • Declaration

    void AppendBlackMark(BlackMarkType type);
    
  • Parameter

    Name Contents Type
    type Black mark BlackMarkType
  • 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.59. 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 BitmapConverterRotation
  • 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.60. 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.61. 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.62. 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 BitmapConverterRotation
  • 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.63. 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 PrintableAreaType
  • 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 mPOP FVP10 TSP100IIIW TSP100IIIBITSP100IIIU TSP100ECO TSP100U TSP100GTTSP100LAN TSP650II TSP650IISK TSP700II TSP800IISM-S210i SM-S220i SM-S230i SM-T300i/T300 SM-T400i BSC10 SM-L200 SM-L300 SP700
StarPRNT StarPRNT StarPRNT StarLine StarGraphic StarGraphic StarGraphic StarGraphic StarGraphic StarGraphic StarGraphic StarLine StarLine StarLine StarLine StarPRNT EscPosMobile StarPRNT EscPosMobile StarPRNT EscPosMobile StarPRNT EscPosMobile StarPRNT EscPosMobile EscPos StarPRNT StarPRNT StarDotImpact

Standard

48 72[1] 48 72[1] 72[1] 72[1] 72[1] 72[1] 72[1] 72[1] 72[1] 72[1] 72[1] 72[1] 104[2] - - - - - - - - - - 64[1][3] - 72[1] 63

Type1

54 - 54 52.5 51 51 51 51 51 51 51 - 34.5 52.5 - - - - - - - - - - - - - - 48

Type2

- 48 - - - - - - - - - - 32 80[1] 72 - - - - - - - - - - - - - 60

Type3

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.)

  • 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.64. 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-8
    When 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.
    CjkUnifiedIdeographFont
  • 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.65. 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 HoldPrintType
  • 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.

  1. Disable the hold print control by the printer firmware using the command generated by this method.
  2. 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.66. 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 PaperPresentStatusType
  • Return value

    None