PHP Priter Functions
| From: | Stephen Goddard | Date: | Fri, 13 Jun 2003 09:41:35 +0000 |
| Subject: | PHP Priter Functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-151344@lists.php.net to get a copy of this message | ||
Hi,
Has anyone managed to get the php printer functions to work on a network
printer. My code is connecting to the printer but .....
Warning: couldn't allocate new print job in
c:\inetpub\wwwroot\phpprinter\print2.php on line 32
test.bmp
Warning: couldn't start a new page in
c:\inetpub\wwwroot\phpprinter\print2.php on line 80
Warning: couldn't end the page in c:\inetpub\wwwroot\phpprinter\print2.php
on line 84
Fatal error: couldn't terminate print job in
c:\inetpub\wwwroot\phpprinter\print2.php on line 121
The same code works on a local printer, so I know the code is ok.
<?
set_time_limit(9000000000000);
$printerhandle = @printer_open("\\\\phill\RICOHCOL");
printer_set_option($printerhandle, PRINTER_MOD, "EMF");
printer_start_doc($printerhandle, "Image Print");
$filename = "test.bmp";
printer_start_page($printerhandle);
printer_draw_bmp($printerhandle, $filename, 1, 1);
printer_end_page($printerhandle);
closedir($handle);
printer_end_doc($printerhandle);
printer_close($printerhandle);
?>
Cheers....