66
addTextAlign method
Adds the text alignment setting to the command buffer.
Syntax
addTextAlign(align);
Parameter
align:(Requiredparameter,Objecttype:String)
Specifiesthetextalignment.
Return value
Exception
Example
•ThisAPIsettingisappliedtorasterimage/NVlogo/barcode/two‐dimensionalsymbol.
•Whenusingthestandardmode,specifyaddTextAligninʺPositionatthebeginningoflinesʺ.
•Inthepagemode,addTextAlignmethodspecificationcannotbeused.
Inthepagemode,usetheaddTextPositionmethodtodesignatethehorizontalprintposition.
•Whenthe
pagemodeisselectedfortheprintmode,tosettextrotation,usethe
addPageDirectionmethod(p.111)insteadofthisAPIfunction.
Constant(align) Description
ALIGN_LEFT (default) Alignment to the left
ALIGN_CENTER Alignment to the center
ALIGN_RIGHT Alignment to the right
Return value Object type
ePOS-Print Builder Object ePOS Builder
Exception Object type
Parameter " ... " is invalid Error
<script type="text/javascript" src="epos-print-3.x.x.js"></script>
<script type="text/javascript">
<!--
function buildMessage() {
var builder = new epson.ePOSBuilder();
builder.addTextAlign(builder.ALIGN_CENTER);
}
//-->
</script>
To set alignment to the center: