how to print the current html page from php
Posted: Mon Nov 08, 2010 4:42 pm
Hi All,
I'm using the following code to print the current html page to my local printer
ob_start();
$content = ob_get_contents();
$handle = printer_open("HP Deskjet F2400 series");
printer_write($handle, $content);
printer_close($handle);
the printer is working and print the html file (not the rendered page)
how can I render the page and send it to the printer?
when I add: printer_set_option($handle, PRINTER_MODE, "raw"); the printer is not responding, I'm using php version 5.3.0
thanks in advance,
Eido
I'm using the following code to print the current html page to my local printer
ob_start();
$content = ob_get_contents();
$handle = printer_open("HP Deskjet F2400 series");
printer_write($handle, $content);
printer_close($handle);
the printer is working and print the html file (not the rendered page)
how can I render the page and send it to the printer?
when I add: printer_set_option($handle, PRINTER_MODE, "raw"); the printer is not responding, I'm using php version 5.3.0
thanks in advance,
Eido