Select your printer model

Parameters are refined by the selected printer.

sendLFCData


Sends the print command.

The error status of this API is the result of sending data to the devices.

When data transmission to the device by this API is completed, the ID, etc. specified in the jobNumber parameter is notified to the listener method set in the setSendCompleteEventListener API of the LFCPrinter class.

When printing by this API is completed, the ID, etc. specified in the jobNumber parameter is notified to the listener method set in the setPrintCompleteEventListener API of the LFCPrinter class.

This API sends data buffered by an add-type API (e.g., addText).

Syntax

 
public void sendLFCData(int timeout, int jobNumber) throws Epos2Exception

Parameter

timeout

Specifies the timeout period before completion of sending in milliseconds.

Value

Description

Integer from 5000 to 600000

Timeout period (in milliseconds)

LFCPrinter.PARAM_DEFAULT

Specifies the default value (10000).

jobNumber

Specifies the ID to be assigned to a print job.

Value

Description

Integer from 0 to 4095

Job ID

Exception

When the process fails, Epos2Exception with one of the following error value occurs.

Error status

Description

ERR_PARAM

An invalid parameter was passed.

ERR_MEMORY

Necessary memory could not be allocated.

ERR_FAILURE

An unknown error occurred.

ERR_ILLEGAL

The control commands have not been buffered.

This API was called while no communication had been started.

Supplementary explanation

  • If this API is called while communication is not available, printer states other than "connection" will be set to "LFCPrinter.UNKNOWN".
  • The status object is set to the status at the timing of execution of this API and will not be updated.
  • When data exceeding the size of the printer's buffer is sent, CODE_ERR_TIMEOUT is returned to setSendCompleteEventListener.
    If the CODE_ERR_TIMEOUTT error occurs, the data sent may not be printed.
    Remove the printed paper to release the printer from the paper removal waiting state.
    If the error is not cleared after removing the paper, restart the printer.
  • When the printer is turned off (restarted), the print data stored in the printer's buffer is deleted.
  • If an error occurs during printing, printing resumes when the error is cleared.
 

Quick Access

  • [Name]
  • [Format]
  • [Range]
  • [Description]
  • [Notes]

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


Epson ePOS SDK for Android

Jump to the top