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

kevin_cazabon at hotmail.com kevin_cazabon at hotmail.com
Tue Oct 21 16:39:39 EDT 2003

While I can't answer your question directly, if your printer has a standard
Windows driver I may have an alternative for you.  I've written a module for
printing to non-PS Windows printers (including a cool graphical printer
setup dialog), and will post it for you tonite.


----- Original Message ----- 
From: "AdvertisingDept" <Layne.Bilyeu at robbstucky.net>
To: <image-sig at python.org>
Sent: Tuesday, October 21, 2003 1:04 PM
Subject: [Image-SIG] PSDraw yields Undefined Error gsize when output

> I am trying to follow the example for PostScript Printing in the PIL
> manual.
> When I use PSDraw() to generate postscript from an image, I can't print
> it.
> 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)
> ps.begin_document()
> ps.image(box,im,72)
> ps.rectangle(box)
> ps.end_document()
> 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.
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig

More information about the Image-SIG mailing list