Dear list members,
I'm using Python 2.5.2 running on Win2k.
I've just try one of Tim Golden's "Win32 How Do I"
hints. Those on printing with win32print - Spooler API
wraper.
The problem? The problem is a huge delay in printing -
about two to four minutes. I'm printing to HP LJ 1320
connected via USB port or print server attached to
parallel port.
Can You explain the cause and perhaps point me out to
solution or workaround?
Sincerely Your's
Here's the code:
import win32print
printer_name = win32print.GetDefaultPrinter ()
#
# raw_data could equally be raw PCL/PS read from
# some print-to-file operation
#
raw_data = "This is a test"
hPrinter = win32print.OpenPrinter (printer_name)
try:
hJob = win32print.StartDocPrinter (hPrinter, 1,
("test of raw data", None, "RAW"))
try:
win32print.WritePrinter (hPrinter, raw_data)
finally:
win32print.EndDocPrinter (hPrinter)
finally:
win32print.ClosePrinter (hPrinter)
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32