Dale Hersh wrote:
I know that in php there are a bunch of basic functions for opening a
connection to a printer and then handling the printer queue and so forth. I
would like to know how to take a string and echo that to the printer in php.

The printer functions only work under Windows. From http://www.php.net/printer :


"These functions are only available under Windows 9.x, ME, NT4 and 2000."

So if you are on windows, you can try running the printer_write() example ( http://www.php.net/printer-write )

If you are not on Windows, one way you can print is to try some output redirection and see what kind of results you get, eg :

system("cat file.txt > lpt1");

were lpt1 is where your printer is connected. If your printer is connected directly to the computer, it is on lp1 (usually, lpt1 is the default printer port (parallel)). I think lpt1 stands for "line printer terminal 1", but I'm not too sure about that. There are probably better ways to do the same on other systems, but this is the quick example I could think of.

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
-----------------------
"Documentation is like sex: when it is good,
 it is very, very good; and when it is bad,
 it is better than nothing."

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to