[reportlab-users] Unconditionally split a string at the end of a cell.

Martin Weissenboeck mweissen at gmail.com
Fri Jan 6 04:03:01 EST 2012


I have a paragraph like

p = Paragraph('ABCDEFG',styleN)

The string does not contain any spaces.
This paragraph becomes part of a table. Width of the column is (e.g.) 5*mm.
I expected the text to be broken in some lines. But there is always one

I have tried to use the function simpleSplit

p5 = simpleSplit('1ABCDEFG', 'ArialNarrow', 9.0, 5*mm)

but without spaces the result is again only one string.

Paragraph(...).breakLinesCJK(5*mm) splits the line, but it seems to be
complicated to put the parts into the table.

I think there should be a simple way to unconditionally split a string at
the end of a cell.
Any ideas?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20120106/edc65a11/attachment.htm>

More information about the reportlab-users mailing list