southbeach
Programmer
Other than keeping a MySQL table with list of known printers, how could I dynamically fill a select box with available printers in network?
Thanks to jpadie's much older post, I am able to print to any network printer by using
I would like to fill in the target printer dynamically. Is this possible or am I stuck with maintaining a table?
Thanks!
Thanks to jpadie's much older post, I am able to print to any network printer by using
Code:
<?php
$filename = "c:\appl\forms\magnowr.pcl";
///////
ob_start();
include $filename;
$contents = ob_get_contents();
ob_end_clean();
///////
$handle = printer_open("\\\\print_server\SHARED_NAME");
printer_set_option($handle, PRINTER_MODE, "raw");
printer_write($handle,$contents);
printer_close($handle);
?>
I would like to fill in the target printer dynamically. Is this possible or am I stuck with maintaining a table?
Thanks!