barcode webapp printing
am 09.05.2007 18:15:16 von Joshua.Moore
------_=_NextPart_001_01C79255.3B659F37
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hello,
=20
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:
=20
=20
function getPrinter($SharedPrinterName) {
global $REMOTE_ADDR;
$host =3D getHostByAddr($REMOTE_ADDR);
return "\\\\".$host."\\".$SharedPrinterName;
}
=20
$handle =3D printer_open(getPrinter("ZebraZ4M"));
=20
printer_set_option($handle, PRINTER_MODE, "RAW");
printer_write($handle, "Text to print");
printer_close($handle);
=20
?>
=20
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.
=20
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.=20
=20
-Josh
------_=_NextPart_001_01C79255.3B659F37--
Re: barcode webapp printing
am 11.05.2007 03:54:29 von bedul
do you tried on normal printer? i mean your script?
sry don't help much.
----- Original Message -----
From: "Moore, Joshua"
To:
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: barcode webapp printing
am 11.05.2007 15:12:01 von Joshua.Moore
It works perfectly fine on a normal printer. I can see when I print to =
the
barcode printer a new printing document comes up then disappears.
-----Original Message-----
From: bedul [mailto:landavia81@gmail.com]=20
Sent: Thursday, May 10, 2007 6:54 PM
To: Moore, Joshua
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] barcode webapp printing
do you tried on normal printer? i mean your script?
sry don't help much.
----- Original Message -----
From: "Moore, Joshua"
To:
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 =3D getHostByAddr($REMOTE_ADDR);
return "\\\\".$host."\\".$SharedPrinterName;
}
$handle =3D 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
--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php