Re: Re: use print

From: Date: Tue, 10 Jun 2003 13:54:03 +0000
Subject: Re: Re: use print
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-150916@lists.php.net to get a copy of this message
You can print from PHP ! The scrip below will print a bmp. It requires you to enable php_printer.dll in your php.ini file The printer handle must be the same, as the shown printer name, in the printers folder (win) For more info look here :- http://uk.php.net/manual/en/ref.printer.php <? $printerhandle = @printer_open("HP OfficeJet Pro 1170C"); $filename = "test.bmp"; printer_set_option($printerhandle, PRINTER_MODE, "EMF"); printer_start_doc($printerhandle, "Image Print"); printer_start_page($printerhandle); printer_draw_bmp($printerhandle, $filename, 1, 1); printer_end_page($printerhandle); printer_end_doc($printerhandle); printer_close($printerhandle); ?> If you mean to have the user print to a paper printer what he sees in his web browser then that has nothing to do with PHP. Printing from a web browser is controlled by the web browser. PHP cannot affect the way a web browser prints. Did I understand you question correctly? Jean-Christian Imbeault

« previous php.general (#150916) next »