Printing on POS slip and receipt validation printer

szpaq234

Reputable
May 22, 2014
4
0
4,510
0
I have an ancient POS printer Axhiohm A470 LINK. You won't find drivers to this printer on the Internet. One way to print (text mode only) is to send print job directly to LPT1 (printer is connected to lpt). After some digging I found that it's pretty easy. Only thing you have to do is correctly create file LPT1 and write to it. I wrote a short program that does the work. However, it prints only slips. The other function of the printer is to validate receipts (or that's how I think it's called). There a slit next to where slip comes out. You can put a receipt inside and printer will print on the receipt. I don't know how to make the printer do that. Anyone knows ?

EDIT:
This might be the answer ESC/POS commands but I have no idea which code that might be.
 

szpaq234

Reputable
May 22, 2014
4
0
4,510
0
I found the procedure involving escape sequences to validate form on Axiohm A470.
1. Send escape sequence 0x1b 0x57. This will open the printer for validation.
2. Send print command, for instance "test\n". '\n' or 0x0A causes text to print on the printer. Insert proper amount of line feed characters (0x0A) at the end so form will be ejected from the printer completely and won't stuck in the middle.
3. Then and only then insert form to validate (validation will detect the form inside and close automatically).
You can also send sequence 0x1b 0x00 to close/cancel validation.
 

ASK THE COMMUNITY