Dear all,
I have been failed so many times to use esc/pos command to set raw printing style.
I used esc commands based on
http://www.delfi.com/SupportDL/Epson/Manuals/TM-T88IV/Programming%20manual%20APG_1005_receipt.pdfespecially i need to use esc commands as follows
ESC a : Select justification (center & right)
ESC d : Print and feed n lines
/t : tab
but I do not understand why the esc command did not work, how to set n variable?
Could you please show me the right way?i would be glad if you can give me an example
this is my code before:
function print() {
var applet = document.jZebra;
if (applet != null) {
applet.findPrinter("zebra");
applet.append("\x1B\x40"); //reset printer
applet.append(chr(27) + 'w1' + chr(27) + 'W1' + chr(27) + chr(69) + "company\r\n" + chr(27) + 'w0' + chr(27) + 'W0');//Format Bold on
applet.append("address\r\n" + chr(27) + chr(70));//Format Bold off
applet.append("Telp\r\n");
applet.append("\n");
applet.append("Cashier '\r\n");
applet.append("------------------------------------------\r\n");
applet.append("Date\r\n");
applet.append("Item \t Price \t Qty \t Disc \t Total \r\n");
applet.append("---------------------------------------- \r\n");
applet.append("------------------------------------------\r\n");
applet.append(chr(27) + chr(97) + chr(2));//right alignment
//applet.append(" SUB TOTAL : \t 3750\r\n");
//applet.append("TAX : \t 5000\r\n");
applet.append(chr(27) + chr(69) + " TOTAL : \t 5000\r\n" + chr(27) + chr(70));
applet.append("CASH : \t 5000\r\n");
applet.append(" CHANGE : \t 5000\r\n");
applet.append(chr(27) + chr(97) + chr(1));//center alignment
applet.append("-THANK YOU-\r\n");
applet.append("\x1B\x40");
applet.append(chr(27) + chr(100) + chr(5));//feed paper 5 lines
applet.print();// Send characters/raw commands to printer
}
monitorPrinting();
}
Regards,
Candra