125
Chapter 4 ePOS-Print API
4
addLayout method
Adds paper layout information to the command buffer.
Syntax
addLayout(type, width, height, margin_top,
margin_bottom, offset_cut, offset_label);
Parameter
type:(Requiredparameter,Objecttype:String)
Specifiesthepapertype.
width:(Optionalparameter,Objecttype:Number,Whennotspecified:580)
Specifiespaperwidth(inunitsof0.1mm).Specifiesanintegerfrom290to600.*
height:(Optionalparameter,Objecttype:Number,Whennotspecified:0)
Specifiespaperheight(inunitsof0.1mm).
Settingofpagelayoutmustbedoneinthestandardmode.Inthepagemode,addLayout
cannotbespecified.
Constant (type) Description
LAYOUT_RECEIPT Receipt (without black mark)
LAYOUT_RECEIPT_BM Receipt (with black mark)
LAYOUT_LABEL Die-cut label (without black mark)
LAYOUT_LABEL_BM Die-cut label (with black mark)
Paper Type Valid value range Description
Receipt
(without black mark)
0 Setup not necessary
Receipt (with black mark)
0 (Auto)
284 to 1550 (Manual) *
Distance from the top of
black mark to the top of
next black mark
Die-cut label
(without black mark)
Distance from the top of
label to the top of next label
Die-cut label
(with black mark)
Distance from the bottom of
black mark to the bottom of
next black mark.