We have a php web application that needs to print a ticket to a special ticket printer.
We would prefer not to create a PDF and print from that because of the extra clicks and time required. Would prefer to print the ticket directly to the printer.
The ticket is 1.975 inches high and 5.5 inches long. We have the drivers for the printer running under Windows.
I’m not exactly sure how to control a printer under Windows, but you’re looking into some command line executing.
Google says that this link might help: http://www.robvanderwoude.com/2kprintcontrol.php
You’ll have to create a file of some sort somewhere, however it’s convenient that you only need to provide your user with only one “print” button which invokes the command line.
I don’t know how this will work on a network printer, I’ve been doing this only with Linux installations.
Umm… If the printer is on the client side, how do you expect to be able to do this through the server?
Unless the scenario we are talking about is on a LAN the server would not be able to print from said printer (Well it is possible with some of the network printers, but it would require the server to know the username/password for the printer as well as the ip, firewalls to be opened etc).
If the printer is on the server side (which I assumed) you would handle it on that side, if the printer is on the clients side you need to handle it from there (unless its on a LAN on the same subnet).
I am looking for something a little more elegant than that. The company that makes the printer has a WEBsdk available however it is for Windows Servers only.