Hello,
I am currently trying to print to my Z4MPlus barcode printer via a php web
application. I first just want to test and see if I can get the printer to
print anything using this code:
<?
function getPrinter($SharedPrinterName) {
global $REMOTE_ADDR;
$host = getHostByAddr($REMOTE_ADDR);
return "\\\\".$host."\\".$SharedPrinterName;
}
$handle = printer_open(getPrinter("ZebraZ4M"));
printer_set_option($handle, PRINTER_MODE, "RAW");
printer_write($handle, "Text to print");
printer_close($handle);
?>
When this is run it just returns with a blank screen without printing
anything on my barcode printer. I am running XP pro, Uniform Server with the
shared printer named "ZebraZ4M" The printer is attached LPT1 on my machine.
I don't see anything on my error logs. Am I going at this the right way? I'm
trying to be able to allow anyone to print barcodes on my intranet via this
web application.
-Josh