Epson TM-T70-i ePOS-Print API Users Manual For TM-i firmware 4.1 - Page 53
Prints an Canvas image, var address, var epos = new epson.CanvasPrintaddress, epos.cut = true
View all Epson TM-T70-i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 53 highlights
Chapter 3 Programming Guide Prints an Canvas image Content drawn in HTML5 Canvas is printed using the ePOS-Print Canvas API. Create an ePOS-Print Canvas API object using the constructor; for the Print method, specify the end point address for the printer to be used for printing as well as the canvas content and whether to select paper cut; and then print a 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 drawCanvas() { // Rendering in HTML5 Canvas // var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); . . Transmission of print document . //Set the end point address var address = 'http://192.168.192.168/cgi-bin/epos/ 3 service.cgi?devid=local_printer&timeout=10000'; //Create an ePOS-Print Canvas API object var epos = new epson.CanvasPrint(address); //Print epos.cut = true; epos.print(canvas); } Run For the details about the printer end point address, refer to Printer End Point Address (p.46). 53