[reportlab-users] Problem with renderPM.saveToFile; how to output .PNG?
waxmop@gtcinternet.com
reportlab-users@reportlab.com
Thu, 14 Aug 2003 12:41:09 -0400
Hurray! Thank you so much! Reportlab needs a tip jar=2E
Original Message:
-----------------
From: Robin Becker robin@reportlab=2Ecom
Date: Thu, 14 Aug 2003 17:19:39 +0100
To: reportlab-users@reportlab=2Ecom
Subject: Re: [reportlab-users] Problem with renderPM=2EsaveToFile; how to
output =2EPNG?
In article <410-220038414122037242@M2W030=2Email2web=2Ecom>,
waxmop@gtcinternet=2Ecom
<waxmop@gtcinternet=2Ecom> writes
>>>You problably meant to use "drawToFile" instead=2E
>
>The graphics guide on page 4 says to use 'saveToFile' rather than
>drawToFile with PNG output:
>
>If we wanted to generate the same drawing as a bitmap file for a website,=
>say, all we need to do is write code like this:
>
>from reportlab=2Egraphics import renderPM
>renderPM=2EsaveToFile(d, 'example1=2Epng', 'PNG')
=2E=2E=2E=2EsaveToFile is a method of the PMCanvas whilst drawToFile is a =
module
level function=2E
PythonWin 2=2E2=2E3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on w=
in32=2E
Portions Copyright 1994-2001 Mark Hammond (mhammond@skippinet=2Ecom=2Eau) =
-
see 'Help/About PythonWin' for further copyright information=2E
>>> from reportlab=2Egraphics=2ErenderPM import PMCanvas
>>> c =3D PMCanvas(10,10)
>>> c=2EsaveToFile('/tmp/bongo=2Epng','PNG')
>>>=20
--=20
Robin Becker
_______________________________________________
reportlab-users mailing list
reportlab-users@reportlab=2Ecom
http://two=2Epairlist=2Enet/mailman/listinfo/reportlab-users
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web=2Ecom/ =2E