send method
Sends a print document created using an ePOS-Print Builder object.
A print document is obtained by executing the toString method (p. 133) of the ePOS‐Print Builder
object.
Syntax
send(request);
Parameter
request :
(Required parameter, Object type : String)
Specifies the print document.
Exception
Parameter " ... " is invalid
XMLHttpRequest is not supported
Example
<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>
Exception
Chapter 4 ePOS-Print API
Object type
Error
Error
139
4