Printing functions
| From: | Luis Moreira | Date: | Mon, 23 Jun 2003 13:36:27 +0000 |
| Subject: | Printing functions | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-20516@lists.php.net to get a copy of this message | ||
Hi
Can someone tell me why on earth the following script writes one line per page (besides a blank
page between pages 1 and 2) ?
And this only if I specify a default printer on PHP.INI, otherwise the printer_open function
fails ...
Thanks
<?php
$handle = printer_open();
print "Printer handle opened\n\n";
printer_start_doc($handle,"Doc1");
printer_start_page($handle);
printer_write($handle,"Line 1\n\n\n");
printer_write($handle,"Line 2\n");
printer_write($handle,"Line 3\n");
printer_write($handle,"Line 4\n");
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
print "Printer closed\n";
?>