Select your printer model

Parameters are refined by the selected printer.

addTextStyle


Adds character style setting to the command buffer.

Syntax

 
public void addTextStyle(int reverse, int ul, int em, int color) throws Epos2Exception

Parameter

reverse

Enables or disables the reverse style.

Value

Description

Printer.TRUE

Enables the reverse style.

Printer.FALSE (default)

Disables the reverse style.

Printer.PARAM_UNSPECIFIED

<Obsolete> Not specify.

Printer.PARAM_DEFAULT

Specifies the default value (reverse style disabled).

ul

Enables or disables the underscore style.

Value

Description

Printer.TRUE

Enables the underscore style.

Printer.FALSE (default)

Disables the underscore style.

Printer.PARAM_UNSPECIFIED

<Obsolete> Not specify.

Printer.PARAM_DEFAULT

Specifies the default value (underscore style disabled).

em

Enables or disables the bold style..

Value

Description

Printer.TRUE

Enables the bold style.

Printer.FALSE (default)

Disables the bold style.

Printer.PARAM_UNSPECIFIED

<Obsolete> Not specify.

Printer.PARAM_DEFAULT

Specifies the default value (bold style disabled).

color

Specifies the color.

Value

Description

Printer.COLOR_NONE

No printing

Printer.COLOR_1 (default)

First color

Printer.COLOR_2

Second color

Printer.COLOR_3

Third color

Printer.COLOR_4

Fourth color

Printer.PARAM_UNSPECIFIED

<Obsolete> Not specify.

Printer.PARAM_DEFAULT

Specifies the default value (first color).

Exception

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

Error status

Description

ERR_PARAM

An invalid parameter was passed.

ERR_MEMORY

Memory necessary for processing could not be allocated.

ERR_FAILURE

An unknown error occurred.

Supplementary explanation

  • Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.
  • If all the parameters are set to "Printer.PARAM_UNSPECIFIED," ERR_PARAM will be returned.
 

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