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

From: Date: Wed, 21 Jul 2004 22:06:28 +0000
Subject: Re: AW: [PHP] Sending the output of a web page to a printer
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-191422@lists.php.net to get a copy of this message
On Wed, 21 Jul 2004 17:42:55 -0400, Vern <vernon@comp-wiz.com> 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 any such thing. You can use JS to open the print box in a web page and you *might* be able to make it print, but I doubt it. > "Jan Tore Morken" <schabuda@gmail.com> wrote in message > news:ccaafd8a04072114315a7da5d6@mail.gmail.com... > > > > 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 Wed, 21 Jul 2004 12:16:31 -0400, Vern <vernon@comp-wiz.com> wrote: > > > 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? > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#191422) next »