PIL, printing on win32
Roach, Mark R.
mrroach at uhg.net
Fri Apr 19 17:22:02 EDT 2002
Hello, all I am trying to print some images using PIL in win32. Through
much trial and error I have come up with the following
... create printer dc etc ...
dc.SetMapMode(win32con.MM_ISOTROPIC)
dc.SetWindowOrg((0, 0))
dc.SetWindowExt((10, 10))
dc.SetViewportOrg((0, 0))
dc.SetViewportExt((mag, mag)) # set the image magnification
pilDisplay.expose(dc.GetHandleOutput()) # pilDisplay is an ImageWin.Dib
dc.EndPage()
dc.EndDoc()
now, the problem is that I get 10 meg spool files. This is better than I
had been getting when I scaled the PIL image before expose()ing it to
the printerdc, but still seems like too much for a 68k image. Does
anyone know of a way to improve this?
Thanks for your help,
Mark Roach
More information about the Python-list
mailing list