note 28687 added to ref.printer

From: Date: Mon, 20 Jan 2003 22:22:11 +0000
Subject: note 28687 added to ref.printer
Groups: php.notes 
Request: Send a blank email to php-notes+get-42446@lists.php.net to get a copy of this message
If you want to address the printer from your PHP-application in a Un*x environment: This is possible if you use a different method. In Unix it would not be logical to address your printer directly from php, but you could for instance generate a PDF-file with PDFlib (or a textfile, or a PNG/JPEG image with GD or what have you) and write it from your php-script to a directory that you use as a "printer-outbox." Next, you write a shellscript that calls some unix tool to print all pdf or other documents in your "outbox" directory and then deletes all files in that directory. Then you use crontab to run this script every minute or as often as you think it's neccessary. You could of course also call the shellscript from your php-application with exec() but you'll probably want to avoid using exec() and the like for security reasons. -- http://www.php.net/manual/en/ref.printer.php http://master.php.net/manage/user-notes.php?action=edit+28687 http://master.php.net/manage/user-notes.php?action=delete+28687 http://master.php.net/manage/user-notes.php?action=reject+28687

« previous php.notes (#42446) next »