March 9th, 2013, 06:00 PM
Join Date: Jan 2013
Time spent in forums: 2 h 13 m 11 sec
Reputation Power: 0
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?