Printing in windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux