[reportlab-users] Cell width - wordwrap

Robin Becker robin at reportlab.com
Mon Mar 13 10:31:41 EDT 2017


On 13/03/2017 10:54, Arkadi Colson wrote:
> Hi
>
> We recently performed an upgrade of reportlab from 2.5 to 3.3 and noticed that
> the way reportlab prints text in a small cell is different. Actually the cell
> width is a little bit to small. With version 2.5 the word was printed over the
> cell lines. Version 3.3 tries to fit it in the cell vertically by splitting the
> word into letters.
> See below...

Hi Arkadi,

yes the wrapping for paragraphs has been improved so long words will get 
wrapped. There is an option in the paragraph style which you can change

Try setting

sty.splitLongWords = False

for the style that you use to format the cell paragraphs.

If you are formatting numbers only it might be better to use the cell formatting 
alone, but presumably you can best judge what works for you.

Incidentally you might want to look at using 3.4.0 which we just released. It 
likely has even more fixes etc etc

http://www.reportlab.com/documentation/relnotes/34/


>
> Version 2.5:
>
>
> Version 3.3:
>
>
> Any idea if this can be changed by some setting in the table or paragraph methods?
>
> Thx!
> Arkadi
........

-- 
Robin Becker


More information about the reportlab-users mailing list