March 9th, 2013, 06:00 PM
Font size win32print
I'm printing to the line printer using the following copy/paste from Py interactive window.
>>> printer_name = win32print.GetDefaultPrinter ()
>>> hPrinter = win32print.OpenPrinter (printer_name)
>>> hJob = win32print.StartDocPrinter (hPrinter, 1, (file, None, "TEXT"))
>>> raw_data = open (file, "r").read()
>>> win32print.WritePrinter (hPrinter, raw_data)
>>> win32print.EndDocPrinter (hPrinter)
>>> win32print.ClosePrinter (hPrinter)
This prints the file to the line printer.
The issue is that the font is huge.
How can I set the font prior to printing?