php_printer.dll not setting options
| From: | Drew Banning | Date: | Mon, 23 Oct 2006 22:57:13 +0000 |
| Subject: | php_printer.dll not setting options | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-4283@lists.php.net to get a copy of this message | ||
Hi,
I have a couple issues with the php_printer.dll extension that I'm
hoping you can help out with. The good news is that I can print just
fine to a network printer. The bad news is I can't seem to get it to
accept printer_set_options for anything. Detail below.
Environment: WAMP (consisting of PHP 5.1.6, Apache 2.0.59, MySQL
5.0.24a) running on a Windows Server 2003.
Code:
<?php
$testdoc = "I wish this printed correctly";
$handle = printer_open("My Printer");
printer_start_doc($handle, "Note");
printer_set_option($handle, PRINTER_MODE, RAW);
printer_set_option($handle, PRINTER_COPIES, 2);
printer_set_option($handle, PRINTER_ORIENTATION,
PRINTER_ORIENTATION_LANDSCAPE);
printer_write($handle, $testdoc);
printer_end_doc($handle);
printer_close($handle);
?>
Issue 1.) The output prints successfully but doesn't print in Landscape.
Issue 2.) If I pause the print queue on the server and run the script, I
see 2 documents - 1 is 1 page long and 1 has N/A for pages. It looks
like this even if I remove the entire line for copies.
So basically, it appears as if the printer commands work but don't pick
up any of my printer_set_option options. What am I messing up? Thanks,
Drew