
[英]How to design the page and print it on the thermal printer on Epson TM-T88V POS Printer
[英]Printing on POS printer(Model EPSON TM-U675POS) using JSP
我在 UI 上有一个自定义的 PRINT RECEIPT 按钮,点击它,调用下面的 function 在 EPSON 打印机上打印收据。我已经安装了 EPSON OPOS ADK,可以直接握手,但不能使用下面的打印function:
The logs states that the device is not getting enabled.
The error pop up coming "After : False".
At last the Result Code as 105.
Could anyone help me please by guiding me as to what wrong I am doing.
Tried writing code to print the receipt but couldn't succeed to even enable the device.
function printReceipt(myWindow) {
var myData = myWindow.myData;
printLDN = "POSPRTR";
alert("inside printReceipt:");
self.POSPrint1 = new ActiveXObject("OPOS.POSPrinter");
resultCode = self.POSPrint1.Open(printLDN);
if (!(resultCode == 0)) {
myWindow.opener.top.main.showErrorMessage(11,97010,null,null ,myWindow);
}
alert("Before"+self.POSPrint1.DeviceEnabled );
self.POSPrint1.DeviceEnabled = "true";
alert("After"+self.POSPrint1.DeviceEnabled );
resultCode = self.POSPrint1.Claim(1000);
if (!(resultCode == 0)) {
alert("cannot be claimed...");
}
alert(self.POSPrint1.DeviceEnabled );
var printerStation = 2;
var feedLines = self.POSPrint1.RecLinesToPaperCut;
var printData = myWindow.self.receiptText;
printData += "\x1b" + "|" + feedLines + "lF" + "\n";
resultCode = self.POSPrint1.PrintNormal(printerStation, printData);
if (!(resultCode == 0)) {
alert("Result Code:"+resultCode);
}
resultCode = self.POSPrint1.Close();
}
在 POS 打印机上打印需要帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.