Select your printer model

Parameters are refined by the selected printer.

addPagePosition


Adds print position setting within the print area in the page mode to the command buffer.

Specifies the print start position (coordinates) within the area specified by the addPageArea API.

Syntax

 
public void addPagePosition(int x, int y) throws Epos2Exception

Parameter

x

Specifies the horizontal print position (in dots).

Value

Description

Integer from 0 to 65535

Horizontal print position (in dots)

Printer.PARAM_UNSPECIFIED

<Obsolete> Not specify.

y

Specifies the vertical print position (in dots).

Value

Description

Integer from 0 to 65535

Specify the horizontal print position in dots.

Printer.PARAM_UNSPECIFIED

<Obsolete> Not specify.

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

  • This API does not work in the standard mode.
  • Use this API between the addPageBegin and addPageEnd APIs.
  • Specify the print start position (coordinates) in accordance with the contents to print. See below.
  • Print data

    Specification method

    When printing a text string

    Specify the leftmost position of the baseline for the first character.

    This can be omitted when printing data with the standard size in left justification. When printing a double-height character, set y to 42 or larger.

    When printing a barcode

    Specify the lower-left position of the symbol. Specify the height of the barcode in y.

    When printing graphics/logo

    Specify the lower-left position of the graphic data. Specify the height of the graphic data in y.

    When printing a 2D symbol

    Specify the upper-left position of the symbol. This can be omitted when printing from the upper-left position.

  • 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