471,624 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

PHP/Windows - how do I send file to my printer?

I'm writing a command-line PHP script that gets executed by a virtual
printer (a redirected port using the Redmon tool). The PHP modifies the
Postscript data before forwarding it to the real printer.

In this case the real printer is an HP LaserJet 5100 with a JetDirect
wireless server. My machine runs Windows XP. The printer, as well as
being accessible through the usual print methods within applications, is
available through its server at 192.168.1.4.

The problem is I just can't work out how I am supposed to send my
Postscript data to the printer from within the PHP script! What commands
do I use? I can't pipe data to a process like lpr, so what do I do? I
tried printer_open() and printer_write, but that just makes the printer
print the Postscript file as raw text rather than processing and
interpreting the Postscript code.

Any ideas, please?

Michael
Sep 27 '05 #1
1 6670
>
Any ideas, please?

I have some ideas, but I don't know will they work.

I think that you can share the printer as old DOS PRN:
and LPTx: devices, which can be open and written to as files

DG
Sep 27 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by free free | last post: by
1 post views Thread by Richard Johnson | last post: by
3 posts views Thread by Larry Maturo | last post: by
7 posts views Thread by Mullin Yu | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.