[reportlab-users] Line-wrapping in tables

Robin Becker robin at reportlab.com
Tue Apr 8 05:07:56 EDT 2014

Hi Steve,

there is some support in recent reportlab for arbitrary splitting. Looking at
the code it seems this is presently only happening if the style has
splitLongWords set. Have you tried that?

Currently the functions that implement this splitting are only invoked when the
current word length is greater than the maximum of the current and next
linelengths ie this is last resrt stuff rather than a hyphenation approach.

That said, you can always implement your own splitting by inserting '</br>' into
the paragraph text at points of your choosing.

On 07/04/2014 18:15, Steve Hill wrote:

> On 07/04/14 17:55, Tim Roberts wrote:


>> What would be "more sensible"? ReportLab doesn't do hyphenation. If

>> there are no spaces, then there's no place to break.


> Well, by "more sensible" I really just mean tweakable in some way to

> make the results readable.


> At the moment I'm producing a report that contains various things

> without spaces, such as web URIs, etc. The upshot is that any long

> lines just get rendered on top of each other (since they escape the

> table cell boundaries), which makes them unreadable. They also run off

> the edge of the page, again making them unreadable.

Robin Becker

More information about the reportlab-users mailing list