Printer functions

From: Date: Wed, 31 Mar 2004 21:27:29 +0000
Subject: Printer functions
Groups: php.general 
Request: Send a blank email to php-general+get-181975@lists.php.net to get a copy of this message
My question involves sending html to the printer to be printed properly. Here is my code: $handle = printer_open('Lexmark Z25-Z35'); printer_start_doc($handle, "test"); printer_start_page($handle); printer_set_option($handle, PRINTER_MODE, 'raw'); printer_set_option($handle, PRINTER_PAPER_FORMAT, PRINTER_FORMAT_LETTER); $file = file_get_contents('http://localhost/'.$page.'.php?mid='.$mid); printer_draw_text($handle, $file, 10, 10); printer_end_page($handle); printer_end_doc($handle); printer_close($handle); When this code runs, a page prints .. However all that prints is the html source, and it only prints one line across the top of the page and nothing else. How does one send html to the printer and have the rendered page print? I've also tried using printer_write instead of printer_draw_text, but to no avail. As always, any help is greatly appreciated. Thank you in advance, Lou

« previous php.general (#181975) next »