RE: Printing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That is because Windoz, for all it's faults, provides a bit of an
interface for applications to exercise some control over printed output,
and even attempts to make it device independent.  Don't know if Gnome,
or other GUI's provide something, but if you write the output intended
for a printer to a physical file and then post that file to your print
spooler using a exec() function that should do the trick.

http://us4.php.net/manual/en/function.exec.php

I suspect you would use the unix command to cause the file to be spooled
to the printer as you would manually (I seem to recall an lpr command
being involved, but don't trust my memory).

This carries with it all the caviates about whether or not you know who
your website visitors are, and what happens when multiple users try to
trigger printing (who loads paper in the printer?).  Another potential
snag is, will you website user (usually "nobody") have permission to
print (execute the lpr command)?

Unless gnome or kde is involved, don't know how you could detect your
printer types, since your program will need to know which pcl (printer
control language) is required.

Good luck,
Anyone have other solutions?

Warren Vail


> -----Original Message-----
> From: Niels Riis Kristensen [mailto:nrk@xxxxxxxxxxxxxx] 
> Sent: Saturday, April 02, 2005 8:03 AM
> To: php-general@xxxxxxxxxxxxx
> Subject:  Printing
> 
> 
> Hi
> 
> I am using a Unix machine (Mac) but can't find ways to print to my 
> local printer. Plenty of information about printing from a 
> PC, but none 
> from a mac. Can that be, that you can't print from php to mac?
> 
> 
> Niels Riis Kristensen
> (nrk@xxxxxxxxxxxxxx)
> 
> NRK Group
> - Electronic Music Engraving
> - Webhosting
> - Dynamic Web design
> - E-Lists hosting
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux