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 addText API to specify print data such as the API.

Syntax

 
- (int) addPageArea:(long)x y:(long)y width:(long)width 
height:(long)height;

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)

Return value

Error status

Description

EPOS2_SUCCESS

The function was executed successfully.

EPOS2_ERR_PARAM

An invalid parameter was passed.

EPOS2_ERR_MEMORY

Memory necessary for processing could not be allocated.

EPOS2_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. The print direction is specified 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 iOS

Jump to the top