Re: barcode webapp printing
| From: | bedul | Date: | Fri, 11 May 2007 01:54:29 +0000 |
| Subject: | Re: barcode webapp printing | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-27868@lists.php.net to get a copy of this message | ||
do you tried on normal printer? i mean your script?
sry don't help much.
----- Original Message -----
From: "Moore, Joshua" <Joshua.Moore@tusd1.org>
To: <php-windows@lists.php.net>
Sent: Wednesday, May 09, 2007 11:15 PM
Subject: [PHP-WIN] barcode webapp printing
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