Select your printer model

Parameters are refined by the selected printer.

addLayout method


Adds sheet layout setting to the command buffer.

Syntax

 
addLayout(type, width, height, margin_top, margin_bottom, offset_cut, offset_label);

Parameter

type

Value

Description

LAYOUT_RECEIPT

Receipt

LAYOUT_RECEIPT_BM

Receipt (with black mark)

LAYOUT_LABEL

Label sheet

LAYOUT_LABEL_BM

Label sheet (with black mark)

width

Value

Description

290 to 800

Specifies the paper width in 0.1-mm units.

height

Sheet type

Valid value

Description

Receipt

0

Specification is not required.

Receipt (with black mark)

  • 0 (auto)
  • 284 to 1550 (manual)

Specifies the distance between the top edges of two consecutive black marks in 0.1-mm units.

Label sheet

Specifies the distance between the top edges of two consecutive labels in 0.1-mm units.

Label sheet (with black mark)

Specifies the distance between the bottom edges of two consecutive black marks in 0.1-mm units.

margin_top

Sheet type

Valid value

Description

Receipt

0

Specification is not required.

Receipt (with black mark)

-150 to 1500

Specifies the distance between the top edge of a black mark to the top of the sheet in 0.1-mm units.

Label sheet

0 to 1500

Specifies the distance between the top edge of a label to the top of the sheet in 0.1-mm units.

Label sheet (with black mark)

-15 to 1500

Specifies the distance between the bottom edge of a black mark to the top of the sheet in 0.1-mm units.

margin_bottom

Sheet type

Valid value

Description

Receipt

0

Specification is not required.

Receipt (with black mark)

0

Specification is not required.

Label sheet

-15 to 0

Specifies the distance between the bottom edge of a label to the bottom of the print area in 0.1-mm units.
(A positive value widens the margin and a negative value narrows it.)

Label sheet (with black mark)

-15 to 15

Specifies the distance between the bottom edge of a black mark to the bottom of the print area in 0.1-mm units.
(A positive value widens the margin and a negative value narrows it.)

offset_cut

Sheet type

Valid value

Description

Receipt

0

Specification is not required.

Receipt (with black mark)

-290 to 50

Specifies the distance between the top edge of a black mark to the cut position in 0.1-mm units.

Label sheet

0 to 50

Specifies the distance between the bottom edge of a label to the cut position in 0.1-mm units.

Label sheet (with black mark)

0 to 50

Specifies the distance between the top edge of a black mark to the cut position in 0.1-mm units.

offset_label

Sheet type

Valid value

Description

Receipt

0

Specification is not required.

Receipt (with black mark)

0

Specification is not required.

Label sheet

0

Specification is not required.

Label sheet (with black mark)

0 to 15

Specifies the distance between the top edge of a black mark to the bottom edge of a label in 0.1-mm units.

Return value

Return value

Object type

Printer object

Printer

HybridPrinter2 object

HybridPrinter2

Exception

Exception

Object type

Parameter " ... " is invalid

Error

Detailed description

Refer to the following for the parameter positions available for each type of paper.

Graphic

Symbol

Parameter

sf

width

sa

height

sb

margin_top

se

margin_bottom

sc

offset_cut

sd

offset_label

Supplementary explanation

This API does not work in the page 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 JavaScript

Jump to the top