77
Chapter 4 ePOS-Print API
4
addTextSize method
Adds the text scale setting to the command buffer.
Syntax
addTextSize(width, height);
Parameter
width:(Optionalparameter,Objecttype:Number)
Specifiesthehorizontalscaleoftext.
height:(Optionalparameter,Objecttype:Number)
Specifiestheverticalscaleoftext.
Return value
Exception
Example
Setting Description
Integer from 1 to 8 Horizontal scale (default : 1)
undefined
(When not specified)
Retains the current setting for the horizontal scale.
Setting Description
Integer from 1 to 8 Vertical scale (default : 1)
undefined
(When not specified)
Retains the current setting for the vertical scale.
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.addTextSize(4, 4);
}
//-->
</script>
To set a horizontal scale of x 4 and a vertical scale of x 4: