[Image-SIG] PIL: Saving as pdf gives Key error

Randy Trigg trigg@parc.xerox.com
Fri, 16 Apr 1999 11:57:50 PDT


>works for me.  the following will show you if
>all drivers are correctly loaded:
>
>>>> import Image
>>>> Image.init()
>>>> Image.SAVE.keys()
>['PNG', 'PDF', 'IM', 'PPM', 'BMP', 'GIF', 'XBM', 'MSP', 'JPEG', 'EPS',
>'DES', 'TIFF']
>
>if you don't get the same results, your installation
>is broken.
>
>...
>
>btw, I just noticed that the PDF driver doesn't work
>for "L" images.  "/DctDecode" should be "/DCTDecode".
>might be problems with "RGB" and "CMYK" images too
>-- I'll fix that in 1.0 final.

Thanks Fredrik for your help.  I tried again, this time starting with the
call to Image.init (that wasn't in the tutorial docs).  That let me save as
PDF.  As you noted, it seems to have trouble with "L" mode images (I was
converting a jpeg).  So I tried converting a tif image instead (mode "1").
This time I got a huge pdf file (16Meg), but when I open with Acrobat
reader, it comes up blank.

Have you ever seen that behavior?

Thanks again,

   - Randy