Epson TM-T70-i ePOS-Print API Users Manual For TM-i firmware 4.1 - Page 47
Reception of Print Result, var epos = new epson.ePOSPrintaddress, epos.onreceive = function res
![]() |
View all Epson TM-T70-i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 47 highlights
Chapter 3 Programming Guide Reception of Print Result The print result can be received by setting a callback function using the onreceive property (p. 145) of the ePOS-Print object. The following information is obtained: ❏ Print result ❏ Error code ❏ Printer status The printer status can be obtained when communication with the printer is possible. Refer to the following program. For the details about how to program a callback function in detail, refer to Error handling (p.48). TITLE function buildMessage() { //Create a print document var builder = new epson.ePOSBuilder(); 3 builder.addTextLang('en'); builder.addTextSmooth(true); builder.addTextFont(builder.FONT_A); builder.addTextSize(3, 3); builder.addText('Hello,\tWorld!\n'); builder.addCut(builder.CUT_FEED); var request = builder.toString(); var address = 'http://192.168.192.168/cgi-bin/epos/ service.cgi?devid=local_printer&timeout=10000'; //Create an ePOS-Print object var epos = new epson.ePOSPrint(address); //Set a response receipt callback function epos.onreceive = function (res) { //When the printing is not successful, display a message if (!res.success) { alert('A print error occurred'); } } //Send the print document epos.send(request); Print result receipt } callback function Run 47
![](/manual_guide/products/epson-p60ii-eposprint-api-user-s-manual-tmi-firmware-41-a0c01f3/47.png)