[reportlab-users] Width of Preformatted?
Michael Hipp
Michael at Hipp.com
Mon Jul 26 12:12:21 EDT 2010
On 7/26/2010 10:55 AM, Robin Becker wrote:
> On 26/07/2010 16:40, Michael Hipp wrote:
>> How can I get the width of a Preformatted object?
>
> fontSize=cell.style.fontSize
> fontName=cell.style.fontName
> w = max([stringWidth(line,fontName,fontSize) for line in cell.lines])
Thanks, I thought the answer might look something like that. Any chance we
could get that code snippet included in the next version for minWidth?
Thanks,
Michael
More information about the reportlab-users
mailing list