[python-win32] Huge print spool files

Mark Roach mrroach@uhg.net
24 Mar 2002 18:11:08 -0600


I am trying to print a large image (a TIFF fax image), and I can't
figure out how to make it more efficient. It is spooling almost 100MB
for each page. Other image viewers are only spooling ~500K. I am using
PIL to scale the image to full page and then using ImageWin.expose on
the printer CDC. Anyone know a better way to do this?

newImg = myPImg.resize((5100,6600))
myImgW = ImageWin.Dib("RGB", (newImg.size))
myImgW.paste(newImg)
myCDC.StartDoc('TestAgain')
myCDC.StartPage()
myImgW.expose(myCDC.GetHandleAttrib())
myCDC.EndPage()
myCDC.EndDoc()