139
Chapter 4 ePOS-Print API
4
send method
Sends a print document created using an ePOS-Print Builder object.
Syntax
send
(request);
Parameter
request
:
(Required
parameter,
Object
type
:
String)
Specifies
the
document.
Exception
Example
A
document
is
obtained
by
executing
the
toString
method
(
of
the
ePOS
‐
Builder
object.
Exception
Object type
Parameter " ... " is invalid
Error
XMLHttpRequest is not supported
Error
<script type="text/javascript" src="epos-print-3.x.x.js"></script>
<script type="text/javascript">
<!--
function printHellowWorld() {
var builder = new epson.ePOSBuilder();
builder.addText('Hello, World!\n');
builder.addCut();
var request = builder.toString();
var address = 'http://192.168.192.168/cgi-bin/epos/service.cgi?devid=local_printer';
var epos = new epson.ePOSPrint(address);
epos.onreceive = function (res) { alert(res.success); };
epos.onerror = function (err) { alert(err.status); };
epos.send(request);
}
//-->
</script>
Summary of Contents for TM-T88V-i
Page 10: ...10 ...
Page 14: ...14 ePOS Print Canvas API Monochrome or Grayscale Monochrome ...
Page 160: ...160 ...
Page 258: ...258 ...