[reportlab-users] renderPM 'module' object hasno attribute 'saveToFile'

Genís Pujol genis.pujol at mss.scc.com
Wed Jul 12 06:59:48 EDT 2006


Hello,

Thanks for your help, I think I'm missing something though, because I'm not getting any output with the instruction you sent me:

Python 2.4.2 (#1, Jun 16 2006, 16:17:38) 
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from reportlab.lib import colors
>>> from reportlab.graphics.shapes import *
>>> from reportlab.graphics import renderPM
>>> d = Drawing(400, 200)
>>> d.add(Rect(50, 50, 300, 100, fillColor=colors.yellow))
>>> d.add(String(150,100, 'Hello World', fontSize=18, fillColor=colors.red))
>>> d.save(formats=['PNG'],outDir='/tmp',fnRoot='example1.png')
''
>>>

This doesn't create any file.

Any ideas?


Genís

-----Original Message-----
From: reportlab-users-bounces at reportlab.com [mailto:reportlab-users-bounces at reportlab.com] On Behalf Of Robin Becker
Sent: lunes, 10 de julio de 2006 14:53
To: Support list for users of Reportlab software
Subject: Re: [reportlab-users] renderPM 'module' object hasno attribute 'saveToFile'

Robin Becker wrote:
> Genís Pujol wrote:
>> Hello,
>>
>>  
>>
>> I've just installed reportlab and the PM plugin, but when I try to 
>> execute a sample script I found in the documentation, I get the 
>> following error:
>>
.......I forgot to say thanks for the report and it's fixed in SVN now.
> or
> 
> d.save(formats=['PNG'],outDir='.',fnRoot='example1')

this won't actually work as that needs 'png'. Probably should allow upper case 
as well.

> 
> the latter is more useful if saving more than one format eg PDF & PNG. 
> Also there's a useful py format which saves the low level drawing 
> operations needed to create your drawing.


-- 
Robin Becker
_______________________________________________
reportlab-users mailing list
reportlab-users at reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users


More information about the reportlab-users mailing list