48
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.48)
.
Refer to the following program.
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
Description
Domain
Specify IP address or domain of ePOS-Print supported TM printer.
Device ID
Specifies the printer to be used for printing.
Specify device ID registered with EpsonNet Config (Web version) of ePOS-Print
supported TM printer or TMNet WebConfig of TM intelligent printer.
Timeout period
Specifies the time to abort the process in milliseconds.
The timeout parameter is optional; when it is omitted, 60 seconds (60000) 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.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>TITLE</title>
<script type="text/javascript" src="epos-print-3.x.x.js"></script>
<script type="text/javascript">
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);
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);
}
</script>
</head>
<body>
<button onclick=”buildMessage()”>Run</button>
</body>
</html>
Transmission of print document
Содержание TM-T88V-i
Страница 10: ...10 ...
Страница 14: ...14 ePOS Print Canvas API Monochrome or Grayscale Monochrome ...
Страница 160: ...160 ...
Страница 216: ...216 Forced transmission mode Supported Recovery from an error Supported Reset Supported Command Supported 80mm ...
Страница 218: ...218 Forced transmission mode Supported Recovery from an error Supported Reset Supported Command Supported 80mm ...
Страница 222: ...222 Forced transmission mode Supported Recovery from an error Supported Reset Supported Command Supported 80mm 58mm ...
Страница 258: ...258 ...