remote printing from php script
| From: | Kim Prisk & Joyce Fennell | Date: | Tue, 27 Feb 2001 09:54:17 +0000 |
| Subject: | remote printing from php script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41823@lists.php.net to get a copy of this message | ||
Hello Listers,
I wish to print a file on a remote printer that is a queue on a Novell
server.
The print command is coming from an exec() function in a php3 script running
under IIS on an NT 4 server.
If I run the script from a dos prompt at the server, the file is printed to
the Novell queue, but if the php3 script is 'run' from a web page it does
not print.
I have also tried the using the 'system()' function with the same result.
By altering the php script, I can make the output go to a printer attached
to the server's lpt1 port, so I know the syntax is OK.
I have tried the 'net use lpt2 \\server\print_queue ' command both in the
windows registry and in a batch file (see below) to send the output to the
queue.
I have also tried putting the print and net use commands in a batch file and
run that from php3.
Maybe someone can see a better approach or has done something like this
before.
Cheers
KIM