[PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
Hey all... I have a new one I haven't encounter before. I need to send the output of a web page to a printer on a schedule (obviously I'll use a cron job for scheduling) and am wondering if I can do this through php. I know you can use the command line lpr in SSH but can I use PHP do do it?

AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Ron Stiemer
Hi there, AFAIK a printer via PHP can only be used on a Windows Platform and not under a Unix System... But when you just want so send a Command via PHP than maybe exec(); or system(); might fit your needs... Regards, -Ron -Ursprüngliche Nachricht- Von: Vern [mailto:[EMAIL PROTECTED]

AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Manuel Lemos
Hi there, I need to send the output of a web page to a printer on a schedule (obviously I'll use a cron job for scheduling) and am wondering if I can do this through php. I know you can use the command line lpr in SSH but can I use PHP do do it? If the printer is remote, you may try using the SMB

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Jan Tore Morken
Yes, it's possible, I've done it myself. Here is a piece of example code: $handle = popen(lpr -P printer, w); fwrite($handle, $message.\n); pclose($handle); Hope this can help you a bit. To see what I used it for, check this out: http://www.wobbled.org/printer/ Regards, Jan Tore Morken On

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
OK, but here's the rub: I need to print a web page. Any ideas? Jan Tore Morken [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Yes, it's possible, I've done it myself. Here is a piece of example code: $handle = popen(lpr -P printer, w); fwrite($handle, $message.\n);

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Manuel Lemos
Hello, On 07/21/2004 06:42 PM, Vern wrote: OK, but here's the rub: I need to print a web page. Any ideas? If it is a PHP script that generates the page, you may want to try generating a Postscript version. This Postscript generation library class may help you: http://www.phpclasses.org/pslib If

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Justin Patrin
On Wed, 21 Jul 2004 17:42:55 -0400, Vern [EMAIL PROTECTED] wrote: OK, but here's the rub: I need to print a web page. Any ideas? Go to it in a web browser and click print. Seriously. If you need to print an HTML page, then you have to have a browser to render it. PHP AFAIK doesn't have

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Marek Kilimajer
Vern wrote: OK, but here's the rub: I need to print a web page. Any ideas? you should be able to use exec('lpr page.html'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
OK, welll this may be off topic then, but is there any way I can print a php page to a printer from the command line in SSH so I can use a CRON job to print it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
That will print the page's html code. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Ed Lazor
You can also use wget to grab the web page and then pipe it to lpr -Original Message- OK, but here's the rub: I need to print a web page. Any ideas? you should be able to use exec('lpr page.html'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
That would be helpful. Could you give me an example please? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Ed Lazor
Can you already send jobs to the printer from SSH? -Original Message- From: Vern [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 21, 2004 3:27 PM To: [EMAIL PROTECTED] Subject: Re: AW: [PHP] Sending the output of a web page to a printer OK, welll this may be off topic then, but

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
Yes but if you print a php page it prints out the code for the php. I need to print out a report that is written in php and uses a MySQL database. If only I could just hit the print button in the browser!!! LOL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Manuel Lemos
Hello, On 07/21/2004 08:26 PM, Vern wrote: Yes but if you print a php page it prints out the code for the php. I need to print out a report that is written in php and uses a MySQL database. In Unix/Linux, the print system takes printouts in Postscript, not HTML. You need to generate Postscript or

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Justin Patrin
On Wed, 21 Jul 2004 15:58:24 -0700, Ed Lazor [EMAIL PROTECTED] wrote: You can also use wget to grab the web page and then pipe it to lpr This will also just grab the page's HTML and print it. -Original Message- OK, but here's the rub: I need to print a web page. Any

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Manuel Lemos
Hello, On 07/21/2004 08:36 PM, Justin Patrin wrote: You can also use wget to grab the web page and then pipe it to lpr This will also just grab the page's HTML and print it. I think you missed the part when the original poster mentioned that he wanted to print the page from a cron script (no

RE: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Ed Lazor
The example depends on how you're printing from SSH. You'll need to check whether wget is available on the system as well. man wget to see it's various parameters. wget http://www.yahoo.com | lpr but like I say... it depends on a few things on your end... -Original Message- That