Epson Mobilink TM-P20II Users Manual - ePOS-Device XML - Page 49
Transmission of Print Document, To Call SOAP/HTTP Interface
![]() |
View all Epson Mobilink TM-P20II manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 49 highlights
Chapter 3 Programming Guide - Executing Print Service 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.51). Refer to the following program. ePOS-Print supported TM printer checks the status of the TM printer used for printing and then start printing operation. To Call SOAP/HTTP Interface Refer to the following program. TITLE function sendDocument() { //Create a print document var request = ''; request += ''; request += ''; request += 'Hello, World! '; request += ''; request += ''; //Create a SOAP envelop var soap = '' + '' + request + ''; //Create an XMLHttpRequest object var xhr = new XMLHttpRequest(); //Set the end point address var url = 'http://192.168.192.168/cgi-bin/epos/ service.cgi?devid=local_printer&timeout=10000'; //Open an XMLHttpRequest object xhr.open('POST', url, true); // xhr.setRequestHeader('Content-Type', 'text/xml; charset=utf-8'); xhr.setRequestHeader('If-Modified-Since', 'Thu, 01 Jan 1970 00:00:00 GMT'); xhr.setRequestHeader('SOAPAction', '""'); // Send print document xhr.send(soap); } 49
![](/manual_guide/products/epson-mobilink-tmp20ii-users-manual-eposdevice-xml-e7bc596/49.png)