45
Chapter 3 Programming Guide
3
To create a text print document:
To create a text print document, store the font settings into the command buffer using text methods and
then create a print document. Refer to the following program.
<script type="text/javascript" src="epos-print-3.x.x.js"></script>
<script type="text/javascript">
function buildMessage() {
//Create an ePOS-Print Builder object
var builder = new epson.ePOSBuilder();
//Create a print document
//<Configure the print character settings>
builder.addTextLang('en');
builder.addTextSmooth(true);
builder.addTextFont(builder.FONT_A);
builder.addTextSize(4, 4);
builder.addTextStyle(false, false, true, undefined);
//<Specify the print data>
builder.addText('Hello,\tWorld!\n');
builder.addCut(builder.CUT_FEED);
//Acquire the print document
var request = builder.toString();
}
</script>
For the string "Hello World!", to create a print document based on the following settings:
❏
Font:
FontA
❏
Scale:
x 4 (horizontal) and x 4 (vertical)
❏
Style:
Bold
Summary of Contents for TM-T88V-i
Page 10: ...10 ...
Page 14: ...14 ePOS Print Canvas API Monochrome or Grayscale Monochrome ...
Page 160: ...160 ...
Page 258: ...258 ...