Epson TM-T70-i ePOS-Print API Users Manual For TM-i firmware 4.1 - Page 46
Transmission of Print Document, Printer End Point Address
View all Epson TM-T70-i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 46 highlights
Transmission of Print Document A print document is sent using an ePOS-Print object. Create an ePOS-Print object using the constructor and specify the end point address for the printer to be used for printing as well as the print document into the send method to send the document. For the details about the printer end point address, refer to Printer End Point Address (p.46). Refer to the following program. TITLE function buildMessage() { //Create a print document var builder = new epson.ePOSBuilder(); 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); Transmission of print document var request = builder.toString(); //Set the end point address 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); //Send the print document epos.send(request); } Run Printer End Point Address Specify the printer end point address in the following format: http://[domain]/cgi-bin/epos/service.cgi?devid=[device ID]&timeout=[timeout time] Items to specify Domain Device ID Timeout period Description Specify IP address or domain of ePOS-Print supported TM printer. Specifies the printer to be used for printing. Specify device ID registered with EPSON TMNet WebConfig of ePOS-Print supported TM printer. Specifies the time to abort the process in milliseconds. The timeout parameter is optional; when it is omitted, 300 seconds (300000) is set. When the timeout period elapses, the print job is canceled; the data already interpreted by the printer before the start of the print abort process is printed. 46