Select your printer model

Parameters are refined by the selected printer.

addPageArea


Adds page mode print area setting to the command buffer.

Specifies the page mode print area (coordinates). Following this API, call an API to specify print data such as the addText API.

Syntax

 
public void addPageArea(int x, int y, int width, int height) throws Epos2Exception

Parameter

x

Specifies the horizontal origin (in dots).

Value

Description

Integer from 0 to 65535

Horizontal origin (in dots)

"0" specifies the leftmost position of the printable area of the printer.

y

Specifies the vertical origin (in dots).

Value

Description

Integer from 0 to 65535

Vertical origin (in dots)

"0" specifies the position where paper is not fed.

width

Specifies the width of a print area (in dots).

Value

Description

Integer from 1 to 65535

Width of a print area (in dots)

height

Specifies the height of a print area (in dots).

Value

Description

Integer from 1 to 65535

Height of a print area (in dots)

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

  • Define the print area in accordance with the contents to print. If the print data does not fit within the print area, the printed contents will be truncated.
  • Use this API between the addPageBegin and addPageEnd APIs.
  • Specify the width and height of the print area in accordance with the print direction setting.
    Otherwise the print data may be truncated. Set the print direction by addPageDirection.
  • This API does not work in the standard mode.
 

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