Re: barcode webapp printing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



do you tried on normal printer? i mean your script?

sry don't help much.
----- Original Message -----
From: "Moore, Joshua" <Joshua.Moore@xxxxxxxxx>
To: <php-windows@xxxxxxxxxxxxx>
Sent: Wednesday, May 09, 2007 11:15 PM
Subject:  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

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux