[reportlab-users] Type 1 fonts and renderPM on Windows

Robin Becker reportlab-users@reportlab.com
Fri, 29 Aug 2003 10:04:36 +0100

In article <>, Leighton Pritchard
<L.Pritchard@scri.sari.ac.uk> writes
>Hi Robin,
>PIL 1.1.4 - and it looked from the above error report that it was at fault. 
>I'm running the Enthought distribution of Python2.2 (ISTR it came with PIL 
>pre-built), so I installed a new copy from SecretLabs, and python 
>renderPM.py then worked past the generation of renderPM0.png and renderPM0.jpg.
>Unfortunately, it throws a wobbly at generating a PICT file:

that should be fixed now. I'm trying some experiments with transparency
and the CVS _renderPM.c had a required extra argument. That's now
optional so things should be back to normal with the latest CVS.
Unfortunately we had a power outage yesterday so the automatic updates
won't have happened yet.

>Traceback (most recent call last):
>  File "renderPM.py", line 582, in ?
>    test()
>  File "renderPM.py", line 567, in test
>    drawToFile(drawing,fullpath,fmt=k)
>  File "renderPM.py", line 522, in drawToFile
>    c.saveToFile(fn,fmt)
>  File "renderPM.py", line 292, in saveToFile
>    return _saveAsPICT(im,fn,fmt)
>  File "renderPM.py", line 243, in _saveAsPICT
>    s = _renderPM.pil2pict(cols,rows,im.tostring(),im.im.getpalette())
>TypeError: pil2pict() takes exactly 5 arguments (4 given)
>and I couldn't follow the C source well enough to see what was wrong... 
>(the docstring suggests only four arguments are required, mind)
>My package works properly now though, and I'm very grateful.
>Thanks again, Robin,
>Dr Leighton Pritchard AMRSC
>PPI, Scottish Crop Research Institute
>Invergowrie, Dundee, DD2 5DA, Scotland, UK
>PGP key 47B4A485: http://www.keyserver.net http://pgp.mit.edu
>reportlab-users mailing list

Robin Becker