note 73433 rejected from ref.printer by bobby
| From: | bobby@php.net | Date: | Fri, 23 Feb 2007 03:24:45 +0000 |
| Subject: | note 73433 rejected from ref.printer by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-123731@lists.php.net to get a copy of this message | ||
Note Submitter: novenobit at yahoo dot com
----
I am trying to print on a WinXP network printer, this is my test code:
<php
$printer="\\\DESKTOP\Cocina";
$handle = printer_open($printer);
if(!$handle || $handle == NULL)
{ die('Error connecting to Printer'); }
else
{
printer_start_doc($handle, "My Document");
printer_set_option($handle, PRINTER_MODE, "RAW");
printer_write($handle, "xxxxxxxxxxxxxxxxxxxxx\n");
}
printer_end_doc($handle);
printer_close($handle);
?>
there is no out put to the network printer,
the server printer (local) works fine but not the \\DESKTOP printer (network), Could anyone help me
with a code sample that works?
NOTE: if I run a DOS / DIR to the network printer it prints ok:
dir > \\Desktop\Cocina
the desktop printer prints the DIR data, so why can't I print with PHP printer function on the
cliente side on my LAN?
Thanks very much for your help,