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.

    Two print modes are available; standard and page modes.

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

    API

    Description

    Standard mode

    Page mode

    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.

    -

    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.

    API

    Description

    Forced transmission

    forceRecover

    Forced transmission function

    forcePulse

    forceStopSound

    forceCommand

    forceReset

    Reception of result

    setStatusChangeEventDelegate

    Registers the callback method for an event.

    setReceiveEventDelegate

    Monitor interval

    interval

    Status monitor interval

    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

    Adds a process to execute to the command buffer.

    addDestroyWindow

    addSetCurrentWindow

    addClearCurrentWindow

    Cursor

    addSetCursorPosition

    addMoveCursorPosition

    addSetCursorType

    Text display

    addText

    addReverseText

    addMarqueeText

    Display setting

    addSetBlink

    addSetBrightness

    Clock

    addShowClock

    Command transfer

    addCommand

    Reception of result

    setReceiveEventDelegate

    Registers the callback method for an event.

    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

    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.

    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.

    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 by using QR codes or iBeacon data.

    EasySelect class is for analyzing QR codes and iBeacon data.

    API

    Description

    Analyzing 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

    Analysis of iBeacon data

    EasySelectInfo class


    This class is for storing data analyzed by parseQR or parseBeacon. Call 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