[reportlab-users] Wrapping text -- changing space between wrapped lines?
Funke, Matt
Matt.funke at vishaypg.com
Thu Sep 13 10:34:27 EDT 2012
Thanks for this! It worked like a charm.
Matt Funke
Programmer/Analyst
Vishay Precision Group, Inc.
951 Wendell Blvd
Wendell, NC 27591 USA
Office: 919-374-5553
Mobile: 919-628-9261
Fax: 919-374-5248
-----Original Message-----
From: reportlab-users-bounces at lists2.reportlab.com [mailto:reportlab-users-bounces at lists2.reportlab.com] On Behalf Of Robin Becker
Sent: Thursday, August 30, 2012 8:58 AM
To: reportlab-users
Subject: Re: [reportlab-users] Wrapping text -- changing space between wrapped lines?
On 28/08/2012 15:35, Funke, Matt wrote:
> I've got some text going into a grid with tightly-defined space in each column. Of course, if it doesn't fit in the defined column width, it wraps around, and that's fine. The problem seems to arise when the text is too long. If I could reduce the amount of space in between each line during wraparound, it would still fit nicely. Could someone point me to information about how to do that within a reportlab.playtpus.tables.Table?
>
> Thanks for your time. Let me know if there's any way I can clarify what I'm after.
You are presumably using a paragraph to wrap the text. The property that sets the interline spacing is called leading; by default I think we use 1.2*fontSize for leading, but you can alter it in the style that's used. If you are using the same style elsewhere then you should create a copy using
cellStyle = ParagraphStyle(name='cellStyle',parent=originalStyle,leading=7.5)
so that the leading change isn't applied where you don't want it.
Also table cells have padding which you can set to zero to increase the total area of the cell that gets used.
--
Robin Becker
_______________________________________________
reportlab-users mailing list
reportlab-users at lists2.reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users
More information about the reportlab-users
mailing list