Epson TM-T70-i ePOS-Print API Users Manual For TM-i firmware 4.1 - Page 45
To create a mode print document, builder.addTextSize4
View all Epson TM-T70-i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 45 highlights
Chapter 3 Programming Guide 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 addPageEnd method into the command buffer. For the string "Hello World!", to create a print document based on the following settings: function buildMessage() { //Create an ePOS-Print Builder object var builder = new epson.ePOSBuilder(); //Create a print document // builder.addPageBegin(); // builder.addPageArea(100, 50, 200, 100); // builder.addPagePosition(0, 42); // builder.addTextLang('en'); builder.addTextFont(builder.FONT_A); builder.addTextSize(4, 4); builder.addTextStyle(false, false, true, undefined); builder.addText('Hello,\tWorld!\n'); 3 // builder.addPageEnd(); builder.addCut(builder.CUT_FEED); //Acquire the print document var request = builder.toString(); } 45