[reportlab-users] Problem with renderPM.saveToFile; how to output .PNG?

waxmop reportlab-users@reportlab.com
Wed, 13 Aug 2003 23:55:39 -0400


Hi-


I just installed reportlab today and I'm trying to create a simple
'hello world' type document, except I want the output to be in .png
format rather than .pdf.  The graphics users guide says I can do
something like this:

from reportlab.graphics import renderPM
renderPM.saveToFile(mydrawing, 'mydrawing.png', 'PNG')

And that's all there ought to be to it!  But when I try that, I get this error:

>>>renderPM.saveToFile(mydrawing, 'mydrawing.png', 'PNG')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'saveToFile'

What am I missing?  What am I doing wrong?

I hope to use reportlab at work as a scriptable alternative to MS
PowerPoint; is anyone doing similar work?

Thanks for the help.