76
addPagePosition
Adds the page mode print-position-set area to the command buffer.
Specifies the print start position (coordinates) in the area specified by the addPageArea method.
Syntax
public void addPagePosition(int x, int y)
throws EposException
Parameter
x : Specifies the horizontal print position (in dots). Specifies an integer from 0 to 65535.
y : Specifies the vertical print position (in dots). Specifies an integer from 0 to 65535.
Exceptions
When processing fails, EposException is thrown with one of the following error values.
Use this API function by inserting it between addPageBegin (p.70) and addPageEnd (p.71).
Specify the print start position (coordinates) according to the content to be printed. Refer to the
following.
To print a character string:
Specify the left end of the baseline for the first character. This can be omitted for left-aligned
printing of standard-sized characters. To print double-sized height characters, specify a value
equal to or greater than 42 for y.
To print a barcode:
Specify the bottom left of the symbol. And specify the barcode height for y.
To print a graphic/logo:
Specify the bottom left of the graphic data. And specify the graphic data height for y.
To print a 2D-Code:
Specify the top left of the symbol. This can be omitted when printing from the top left.
Error status Description
ERR_PARAM Invalid parameter was passed.
ERR_MEMORY Could not allocate memory.
ERR_FAILURE An unspecified error occurred.