Epson ePOS SDK for iOS

    List of ePOS SDK API

    Epson ePOS SDK for iOS provides the following classes:

    Note:

    Epos2Printer class


    Controls printing by the printer.

    API

    Description

    Initialization

    initWithPrinterSeries

    Initializes the Epos2Printer class.

    Communication path

    connect

    Connects to the printer.

    disconnect

    Disconnects from the printer.

    Status monitor

    startMonitor

    Enables status event notification.

    stopMonitor

    Disables status event notification.

    Status acquisition

    getStatus

    Acquires status of the connected printer.

    Transmission

    sendData

    Sends a command to the printer.

    Transaction

    beginTransaction

    Starts a transaction.

    endTransaction

    Ends a transaction.

    Print job

    requestPrintJobStatus

    Acquires the print result.

    Buffer clear

    clearCommandBuffer

    Clears the command buffer.

    Text

    addTextAlign

    Adds text alignment setting to the command buffer.

    addLineSpace

    Adds line spacing setting to the command buffer.

    addTextRotate

    Adds text rotation setting to the command buffer.

    addText

    Adds text to print to the command buffer.

    addTextLang

    Adds language setting to the command buffer.

    addTextFont

    Adds character font setting to the command buffer.

    addTextSmooth

    Adds character smoothing setting to the command buffer.

    addTextSize

    Adds character scaling factor setting to the command buffer.

    addTextStyle

    Adds character style setting to the command buffer.

    addHPosition

    Adds character print position setting to the command buffer.

    Paper feed

    addFeedUnit

    Adds paper-feed setting in dots to the command buffer.

    addFeedLine

    Adds paper-feed setting in lines to the command buffer.

    Graphics

    addImage

    Adds a raster image print command to the command buffer.

    addLogo

    Adds a NV logo print command to the command buffer.

    Barcode

    addBarcode

    Adds a barcode print command to the command buffer.

    addSymbol

    Adds a 2D symbol print command to the command buffer.

    Ruled line

    addHLine

    Adds a horizontal ruled line print command to the command buffer.

    addVLineBegin

    Adds a vertical ruled line start command to the command buffer.

    addVLineEnd

    Adds a vertical ruled line end command to the command buffer.

    Page mode

    addPageBegin

    Adds a page mode start command to the command buffer.

    addPageEnd

    Adds a page mode end command to the command buffer.

    addPageArea

    Adds page mode print area setting to the command buffer.

    addPageDirection

    Adds page mode print direction setting to the command buffer.

    addPagePosition

    Adds page mode print position setting to the command buffer.

    addPageLine

    Adds a page mode line draw command to the command buffer.

    addPageRectangle

    Adds a page mode rectangle draw command to the command buffer.

    Batch rotate print

    addRotateBegin

    Adds the start batch rotate print mode to the command buffer.

    addRotateEnd

    Adds the end batch rotate print mode to the command buffer.

    Cut

    addCut

    Adds a sheet cut command to the command buffer.

    Drawer

    addPulse

    Adds a drawer kick command to the command buffer.

    Buzzer

    addSound

    Adds a buzzer sound command to the command buffer.

    Label sheet/black mark sheet

    addFeedPosition

    Adds a paper feed command to the command buffer.

    addLayout

    Adds sheet layout setting to the command buffer.

    Command

    addCommand

    Adds a command to the command buffer.

    Maintenance counter

    getMaintenanceCounter

    Acquires the counter value.

    resetMaintenanceCounter

    Resets the counter value.

    Printer setting

    getPrinterSetting

    Acquires the set value of the printer setting.

    setPrinterSetting

    Changes the printer setting.

    getPrinterSettingEx

    Acquires the set value of the printer setting in JSON.

    setPrinterSettingEx

    Specifies the printer setting in JSON.

    setPrinterSettingEx[Obsolete]

    verifyPassword

    Check the printer administrator password.

    Information acquisition

    getPrinterInformation

    Acquires the printer information.

    Firmware update

    downloadFirmwareList

    Acquires the list of the firmware.

    getPrinterFirmwareInfo

    Acquires the information of the printer firmware.

    verifyUpdate

    Acquires the result of the firmware update.

    updateFirmware

    Instructs the printer to write the firmware image.

    Forced transmission

    forceRecover

    Forced transmission function

    forcePulse

    forceStopSound

    forceCommand

    forceReset

    Reception of result

    setStatusChangeEventDelegate

    Registers the callback method for an event.

    setReceiveEventDelegate

    setGetPrinterSettingExDelegate

    setSetPrinterSettingExDelegate

    setVerifyPasswordDelegate

    Monitor interval

    interval

    <Obsolete> Status monitor interval

    The print mode includes the standard mode, page mode, and the batch rotate print mode.

    • Standard mode
    • Prints line by line. Line spacing is automatically adjusted according to character size, image size, and barcode height. Suitable for printing receipts whose print length varies by print content.

    • Page mode
    • Prints page by page. Prints characters, images, and/or barcodes on a single page that is defined as a print area.
      To print in the page mode, use addPageBegin and addPageEnd to start and end the page mode process, respectively.

    • Batch rotate print mode
    • This is a print mode in which the range of the print data (such as characters, images, barcodes, etc.) is set, the print data in the set range is compiled, inverted, and then printed.
      When performing the processing in the batch rotate print mode, start the batch rotate print processing with addRotateBegin, and end the batch rotate print processing with addRotateEnd.

    The APIs that can be used in each mode are described in the table below.

    API

    Standard mode

    Page mode

    Batch rotate
    print mode

    initWithPrinterSeries

    -

    -

    -

    connect

    -

    -

    -

    disconnect

    -

    -

    -

    startMonitor

    stopMonitor

    getStatus

    sendData

    -

    beginTransaction

    endTransaction

    -

    requestPrintJobStatus

    clearCommandBuffer

    -

    addTextAlign

    -

    addLineSpace

    addTextRotate

    -

    addText

    addTextLang

    addTextFont

    addTextSmooth

    addTextSize

    addTextStyle

    addHPosition

    addFeedUnit

    addFeedLine

    addImage

    addLogo

    addBarcode

    addSymbol

    addHLine

    -

    addVLineBegin

    -

    addVLineEnd

    -

    addPageBegin

    -

    -

    addPageEnd

    -

    -

    addPageArea

    -

    -

    addPageDirection

    -

    -

    addPagePosition

    -

    -

    addPageLine

    -

    -

    addPageRectangle

    -

    -

    addRotateBegin

    -

    -

    addRotateEnd

    -

    -

    addCut

    -

    -

    addPulse

    -

    -

    addSound

    -

    -

    addFeedPosition

    -

    addLayout

    -

    addCommand

    Epos2HybridPrinter class


    Controls the hybrid model printers.

    API

    Description

    Initialization

    initWithLang

    Initializes the HybridPrinter class.

    Communication path

    connect

    Connects to the printer.

    disconnect

    Disconnects from the printer.

    Status monitor

    startMonitor

    Enables status event notification.

    stopMonitor

    Disables status event notification.

    Status acquisition

    getStatus

    Acquires status of the connected printer.

    Transmission

    sendData

    Transfers a print command.

    Transaction

    beginTransaction

    Starts a transaction.

    endTransaction

    Ends a transaction.

    Buffer clear

    clearCommandBuffer

    Clears the command buffer.

    Print method

    selectPaperType

    Specifies a print method.

    Paper feed

    waitInsertion

    Inserts paper.

    cancelInsertion

    Cancels waiting for paper insertion.

    Paper eject

    ejectPaper

    Ejects paper.

    MICR

    readMicrData

    Reads by MICR.

    cleanMicrReader

    Cleans the MICR mechanism.

    Forced transmission

    forceRecover

    Forced transmission function

    forcePulse

    forceCommand

    forceReset

    Print method acquisition

    paperType

    Acquires the print method setting information.

    Monitor interval

    interval

    Printer status update interval

    On standby

    waitTime

    Time from insertion of a paper to start of operation

    40cpl mode

    mode40Cpl

    40cpl mode

    Reception of result

    setStatusChangeEventDelegate

    Registers the callback method for an event.

    setReceiveEventDelegate

    List of supported control operations for HybridPrinter class

    APIs available for the Epos2HybridPrinter class depend on the print method.

    The APIs and corresponding print methods are listed below.

    API

    Control operation

    Receipt

    Slip sheet

    Endorsement

    Validation

    MICR

    initWithLang

    connect

    disconnect

    startMonitor

    stopMonitor

    getStatus

    sendData

    -

    beginTransaction

    endTransaction

    clearCommandBuffer

    -

    selectPaperType

    -

    waitInsertion

    -

    -

    cancelInsertion

    -

    ejectPaper

    -

    readMicrData

    -

    -

    -

    -

    cleanMicrReader

    -

    -

    -

    -

    setStatusChangeEventDelegate

    setReceiveEventDelegate

    Creating print document by the Epos2HybridPrinter class

    The Epos2HybridPrinter class creates a print document using the same API as the Epos2Printer class.

    The APIs and corresponding print methods are listed below.

    API

    Print method

    Receipt

    Slip sheet

    Endorsement

    Endorsement (40cpl)

    Validation

    Text

    addTextAlign

    -

    addLineSpace

    -

    addTextRotate

    addText

    addTextLang

    -

    -

    addTextFont

    -

    addTextSmooth

    -

    -

    -

    -

    addTextSize

    -

    addTextStyle

    *

    *

    -

    *

    addHPosition

    Paper feed

    addFeedUnit

    addFeedLine

    Graphics

    addImage

    -

    -

    -

    -

    addLogo

    -

    -

    -

    -

    Barcode

    addBarcode

    -

    -

    -

    -

    addSymbol

    -

    -

    -

    -

    Page mode

    addPageBegin

    -

    -

    addPageEnd

    -

    -

    addPageArea

    -

    -

    addPageDirection

    -

    -

    addPagePosition

    -

    -

    addPageLine

    -

    -

    -

    addPageRectangle

    -

    -

    -

    Cut

    addCut

    -

    -

    -

    -

    Drawer

    addPulse

    Command

    addCommand

    * The reverse parameter is not supported.

    Epos2LineDisplay class


    Controls character display on the customer display.

    API

    Description

    Initialization

    initWithDisplayModel

    Initializes the Epos2LineDisplay class.

    Communication path

    connect

    Connects to the customer display.

    disconnect

    Disconnects from the customer display.

    Status acquisition

    getStatus

    Acquires status of the connected device.

    Transmission

    sendData

    Sends a command to the customer display.

    Buffer clear

    clearCommandBuffer

    Clears the command buffer.

    Reset

    addInitialize

    Initializes the customer display.

    Window

    addCreateWindow

    Defines the display area.

    addDestroyWindow

    Deletes the display area setting.

    addSetCurrentWindow

    Switches between display areas.

    addClearCurrentWindow

    Deletes the current display area.

    addCreateScreen

    Defines the base window.

    addCreateScreenCustom

    Defines the base window.

    addCreateTextArea

    Defines the display area.

    addDestroyTextArea

    Deletes the display area setting.

    addSetCurrentTextArea

    Switches between display areas.

    addClearCurrentTextArea

    Deletes the current display area.

    Cursor

    addSetCursorPosition

    Moves the cursor.

    addMoveCursorPosition

    Moves the cursor within the display area.

    addSetCursorType

    Changes the cursor display.

    Text display

    addText

    Displays text.

    addReverseText

    Displays inverted text.

    addMarqueeText

    Displays a marquee.

    Display setting

    addSetBlink

    Blinks display.

    addSetBrightness

    Changes the display brightness.

    addBackgroundColor

    Sets the background color.

    Graphic

    addStartSlideShow

    Starts a slide show.

    addStopSlideShow

    Ends a slide show.

    addDownloadImage

    Displays an image.

    addRegisterDownloadImage

    Registers an image.

    addNVImage

    Displays an NV image.

    addClearImage

    Deletes an image.

    Barcode

    addSymbol

    Displays a two-dimensional symbol.

    addClearSymbol

    Deletes a two-dimensional symbol.

    Clock

    addShowClock

    Displays the clock.

    Command transfer

    addCommand

    Runs an optional command.

    Reception of result

    setReceiveEventDelegate

    Registers the callback method for an event.

    The APIs and parameters that can be used vary depending on the customer display used and its display modes.

    The table below shows the API that can be used in each customer display and display mode.

    API

    Parameter

    DM-D30

    DM-D70

    (Standard mode)

    DM-D70

    (Column/row fixed mode)

    DM-D110/

    DM-D210

    initWithDisplayModel

    connect

    disconnect

    getStatus

    sendData

    clearCommandBuffer

    addInitialize

    addCreateWindow

    -

    addDestroyWindow

    -

    addSetCurrentWindow

    -

    addClearCurrentWindow

    -

    addCreateScreen

    -

    -

    addCreateScreenCustom

    -

    -

    addCreateTextArea

    -

    -

    -

    addDestroyTextArea

    -

    -

    -

    addSetCurrentTextArea

    -

    -

    -

    addClearCurrentTextArea

    -

    -

    -

    addSetCursorPosition

    addMoveCursorPosition

    addSetCursorType

    -

    -

    addText

    data

    lang

    ✔*

    ✔*

    x

    y

    r

    -

    -

    -

    g

    -

    -

    -

    b

    -

    -

    -

    addReverseText

    -

    -

    addMarqueeText

    addSetBlink

    -

    -

    addSetBrightness

    addBackgroundColor

    -

    -

    -

    addStartSlideShow

    -

    -

    -

    addStopSlideShow

    -

    -

    -

    addDownloadImage

    -

    -

    -

    addRegisterDownloadImage

    -

    -

    -

    addNVImage

    -

    -

    -

    addClearImage

    -

    -

    -

    addSymbol

    -

    -

    -

    addClearSymbol

    -

    -

    -

    addShowClock

    -

    -

    -

    addCommand

    setReceiveEventDelegate

    *: The setting value EPOS2_LANG_MULTI cannot be used.

    Epos2Keyboard class


    Controls character entry from the keyboard.

    API

    Description

    Initialization

    init

    Initializes the Epos2Keyboard class.

    Communication path

    connect

    Connects to the keyboard.

    disconnect

    Disconnects from the keyboard.

    Status acquisition

    getStatus

    Acquires status of the connected device.

    String setting

    setPrefix

    Sets the condition to handle as a continuous string.

    String setting acquisition

    getPrefix

    Acquires the set prefix.

    Key detection

    setKeyPressEventDelegate

    Registers the callback method for an event.

    String detection

    setReadStringEventDelegate

    Epos2POSKeyboard class


    Controls character entry from the POS keyboard.

    API

    Description

    Initialization

    init

    Initializes the Epos2POSKeyboard class.

    Communication path

    connect

    Connects to the keyboard.

    disconnect

    Disconnects from the keyboard.

    Status acquisition

    getStatus

    Acquires status of the connected device.

    Key detection

    setKeyPressEventDelegate

    Registers the callback method for an event.

    Epos2BarcodeScanner class


    Controls barcode reading by the barcode scanner.

    API

    Description

    Initialization

    init

    Initializes the Epos2BarcodeScanner class.

    Communication path

    connect

    Connects to the barcode scanner.

    disconnect

    Disconnects from the barcode scanner.

    Status acquisition

    getStatus

    Acquires status of the connected device.

    Input data reception

    setScanEventDelegate

    Registers the callback method for an event.

    Epos2MSR class


    Controls card reading by the MSR.

    API

    Description

    Initialization

    init

    Initializes the Epos2MSR class.

    Communication path

    connect

    Connects to the MSR.

    disconnect

    Disconnects from the MSR.

    Status acquisition

    getStatus

    Acquires status of the connected device.

    Data detection

    setDataEventDelegate

    Registers the callback method for an event.

    Epos2SimpleSerial class


    Controls serial communication between the printer and device.

    API

    Description

    Initialization

    init

    Initializes the Epos2SimpleSerial class.

    Communication path

    connect

    Connects to the serial.

    disconnect

    Disconnects from the serial.

    Status acquisition

    getStatus

    Acquires status of the connected device.

    Command transfer

    sendCommand

    Transfers a command.

    Input data reception

    setReceiveEventDelegate

    Registers the callback method for an event.

    Epos2GermanyFiscalElement class


    Connects to the German fiscal element (TSE), and controls data read/write operations.

    API

    Description

    Initialization

    init

    Initializes the Epos2GermanyFiscalElement class.

    Communication path

    connect

    Connects to the German fiscal element (TSE).

    disconnect

    Disconnects from the German fiscal element (TSE).

    Status acquisition

    getStatus

    Acquires status of the German fiscal element (TSE).

    Operation

    operate

    Send the JSONsring to the German fiscal element (TSE).

    Reception of result

    setReceiveEventDelegate

    Registers the callback method for an event.

    Epos2OtherPeripheral class


    Controls peripheral devices via the developed device control programs.

    API

    Description

    Initialization

    init

    Initializes the Epos2OtherPeripheral class.

    Communication path

    connect

    Connects to the device.

    disconnect

    Disconnects from the device.

    Status acquisition

    getStatus

    Acquires status of the connected device.

    Transmission

    sendData

    Data transmission

    Reception of result

    setReceiveEventDelegate

    Registers the callback method for an event.

    Epos2CommBox class


    Controls data transmission and reception using the communication box.

    API

    Description

    Initialization

    init

    Initializes the Epos2CommBox class.

    Communication path

    connect

    Connects to the communication box.

    disconnect

    Disconnects from the communication box.

    Status acquisition

    getStatus

    Acquires status of the connected device.

    Transmission history

    getCommHistory

    Acquires the message transmission history.

    Transmission

    sendMessage

    Sends a message to the communication box.

    Reception

    setReceiveEventDelegate

    Registers the callback method for an event.

    Common to all classes


    These APIs can be used with all classes.

    API

    Description

    Administration information

    getAdmin

    Acquires the administration information.

    getLocation

    Acquires the installation location information.

    Reconnection

    setConnectionEventDelegate

    Registers the callback method for an event.

    Epos2Discovery class


    Controls the device discovery function.

    API

    Description

    Start

    start

    Starts device search.

    Stop

    stop

    Stops device search.

    Epos2Log class


    Controls the log output function.

    API

    Description

    Log

    setLogSettings

    Sets the log output function.

    Version acquisition

    SdkVersion

    Acquires the Epson ePOS SDK version.

    Epos2BluetoothConnection class


    Controls pairing connection with a Bluetooth device.

    API

    Description

    Bluetooth communication path

    connectDevice

    Establishes Bluetooth connection.

    disconnectDevice

    Disconnects Bluetooth connection.

    EasySelect class


    EasySelect class and EasySelectInfo class offer API commands and member variables for selecting printers using NFC tags, QR codes, or iBeacon data.

    EasySelect class analyzes NFC tags, QR codes, and iBeacon data.

    API

    Description

    Analysis of NFC tags

    parseNFC

    Analyzes NFC tag data.

    Analysis of QR codes

    parseQR

    Analyzes QR codes data.

    Creation of QR codes

    createQR

    Creates QR code data that can be analyzed by parseQR.

    Analysis of printer information

    parseBeacon

    Analyzes iBeacon data.

    EasySelectInfo class


    Stores data analyzed by parseNFC, parseQR or parseBeacon. Calls the connect API command with the information of these member variables to connect with the printer.

    Member variables

    Description

    Printer type

    deviceType

    Stores printer type information.

    Printer name

    printerName

    Stores a printer name.

    MAC address/BD address

    macAddress

    Stores a MAC address or a BD address.

    Target information

    target

    Stores the target information.


    Epson ePOS SDK includes patented or patent pending functions. The contents must not be disclosed to third parties.

    Jump to the top