[reportlab-users] Width of Preformatted?
robin at reportlab.com
Mon Jul 26 12:33:01 EDT 2010
On 26/07/2010 17:12, Michael Hipp wrote:
> 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?
>> 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?
I'll put it in now and see what happens; not sure why the wrap function doesn't
do the right thing; presumably it's being lazy.
More information about the reportlab-users