Printing in windows
| From: | Fernando Ocampo Ramón | Date: | Thu, 17 Nov 2005 19:07:17 +0000 |
| Subject: | Printing in windows | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-26511@lists.php.net to get a copy of this message | ||
Greetings from Mexico.
I wrote an script to pull some data from a database and created a report to be printed directly by php. All went fine until i noticed that after the actual printing there is an extra blank page. I've tried on a Epson FX980 and several HP LaserJet Printers with the same result. Checking the spooler i see 2 jobs for every report i send to the printer.
Even if a send a single line using the script below i got 2 pages.
$text = 'Hello printer... How do you do?';
$handle = printer_open( ); // Blank means default windows printer
printer_start_doc($handle, "My Document");
printer_start_page($handle);
printer_write( $text );
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
what i'm doing wrong?
Fernando Ocampo