473,386 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 6912
>
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: free free | last post by:
Hi, i'am writing a python program and now i need to print some stuff. Before print i want to set the text to condensed text and to italic, so i have to send some esc commads to printer. my...
1
by: Richard Johnson | last post by:
I am a C++ newbie and am trying to send simple text data to my local printer. My printer is a USB printer and I have tried the following code using my USB port. This code executes but does not send...
11
by: IC_Clearly | last post by:
I'm running Server 2003 and wonder how well WTS works when printing an Access report to a client. Any suggestions would be appreciated. Thanks. IC
3
by: Larry Maturo | last post by:
I'm not sure if this is the right group to post this to, but here goes. I need to find out the name of the print spool file for every job queued to a particular printer. I actually need to read a...
7
by: Mullin Yu | last post by:
if i put the same code at the windows application or console, i can logon to the computer. but, if i put the same code at the windows service and start it, i still can't logon to the machine. ...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
1
by: remya1000 | last post by:
how to send a .txt file to a printer. after creating a .txt file i need to send that .txt file to a printer.using vb.net and while sending that file to printer i need to tell, which printer i need...
1
by: Steve | last post by:
Hi All I am using vb.net 2005 in a windows forms application I send data to the selected windows printer using a PrintDocument object Is there any way to detect if the Printer is not...
0
by: dtnam | last post by:
Hi, I want to do something like that: void doc_PrintPage(object sender, PrintPageEventArgs e) { // draw a rectangle e.Graphics.DrawRectangle(Pens.Black, new Rectangle(10, 10, 100,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.