Forum OpenACS Q&A: Re: Printing with printer control fonts from HTML

Collapse
Posted by Roger Smeds on
If all you are trying to do is open a cash drawer, I think I found something that may work for you. I spent several days researching this to no avail, although several solutions are posted in this forum. It occurred to me that the process ought to be much more simple than some of the approaches mentioned here. What worked was to specify a separator page in your receipt printer setup. This is sent to the printer just prior to the print job. The only thing in the separator page file is the hex commands to open the drawer. For my Epson TM-U200 (emulated) receipt printer the hex codes are 1b 70 00 19 ff. There is a good discussion of what is required to create a custom separator page at http://support.microsoft.com/kb/102712 Basically you create a file in something like notepad that has the following in it and nothing else. The first character defines what is an escape character. @ @H1b @H70 @H00 @H19 @Hff I placed each of the codes on a single line followed by a carriage return (the first character as well). Save the file with a .sep extension to the Windows - System32 directory, then specify the file as the separator page in your printer setup. Every time you send a print job to the receipt printer, the cash drawer will open. It sounds like you can use this process to set other printer control codes if necessary, but I haven't tried that. I just wanted the drawer to open.