47
Chapter 3 Programming Guide
3
To create a page mode print document
When the addPageBegin method is stored in the command buffer, the page mode starts. Store the print
area (addPageArea method) and the print start position (addPagePosition method) into the command
buffer. Specify the print start position according to the print data. After that, store the methods into the
command buffer to create print data. For the end of page mode, store the PageEnd method into the
command buffer.
<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
//<The page mode starts>
builder.addPageBegin();
//<Specify the page mode print area>
builder.addPageArea(100, 50, 200, 100);
//<Specify the page mode print position>
builder.addPagePosition(0, 42);
//<Specify the print data>
builder.addTextLang('en');
builder.addTextFont(builder.FONT_A);
builder.addTextSize(4, 4);
builder.addTextStyle(false, false, true, undefined);
builder.addText('Hello,\tWorld!\n');
//<The page mode ends>
builder.addPageEnd();
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:
Содержание TM-T88V-i
Страница 10: ...10 ...
Страница 14: ...14 ePOS Print Canvas API Monochrome or Grayscale Monochrome ...
Страница 160: ...160 ...
Страница 216: ...216 Forced transmission mode Supported Recovery from an error Supported Reset Supported Command Supported 80mm ...
Страница 218: ...218 Forced transmission mode Supported Recovery from an error Supported Reset Supported Command Supported 80mm ...
Страница 222: ...222 Forced transmission mode Supported Recovery from an error Supported Reset Supported Command Supported 80mm 58mm ...
Страница 258: ...258 ...