[Image-SIG] PSDraw yields Undefined Error gsize when output on PSdevice

AdvertisingDept Layne.Bilyeu at robbstucky.net
Tue Oct 21 16:04:52 EDT 2003

I am trying to follow the example for PostScript Printing in the PIL 

When I use PSDraw() to generate postscript from an image, I can't print 

Example from the Python Image Library Manual

import Image, PSDraw
im = Image.open('lena.gif').convert('L')
box = (1*72, 2*72, 7*72, 10*72)
outfp = open('lena.ps','w')
ps = PSDraw.PSDraw(outfp)

When I try to send 'lena.ps' to the printer, the print job is aborted.

The error it gives is always related to gsize.

Error: undefined gsize

It does this on several different PostScript Devices.
I've tried converting to RGB, L, and CMYK modes to no avail.

I've searched the various mailing lists and noticed that this has been 
asked before, but no-one ever responds.

What is the secret to getting the PSDraw example in the PIL Manual to 
function correctly?

Thanks In Advance.  

More information about the Image-SIG mailing list