I am developing a PHP script that will run locally on a computer. I need a way for that PHP script to fire off two print jobs simultaneously (each one going to a different USB printer that is directly connected to the machine). Because our client wants as little of a footprint as possible, building a full fledged Windows application is out of the question.
Basically the problem is: how do I fire two print jobs simultaneously and automatically using the command line and existing software? Of course there is the DOS print command, but using this or echo does not seem to work on USB printers.
So I believe the answer lies somewhere in running an LPD service on the machine, then configuring both printers to use an LPR port. And then using the "lpr" command in the command prompt to print to both printers. The problem is, I don't know how to get both printers set up properly.
Here is what I'm doing exactly:
1. installed Print and Document services from Programs and Features
2. Start->Devices and Printers->right clicked on the printer->Printer properties->Ports tab->Add Port->LPR port
3. I entered "localhost" for server name and the name of the printer as it appeared on Devices and Printers for printer name
4. I did this for both printers
5. on the command line, i typed: "lpr -S localhost -P printername testprint.txt
6. I get "Error: print server did not accept request. Job aborted."
Hope this explains the problem better
Thanks,
Lester