[reportlab-users] Cell width - wordwrap

394 views
Skip to first unread message

Arkadi Colson

unread,
Mar 13, 2017, 6:54:12 AM3/13/17
to reportl...@lists2.reportlab.com

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...

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

unread,
Mar 13, 2017, 10:30:58 AM3/13/17
to reportlab-users
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
_______________________________________________
reportlab-users mailing list
reportl...@lists2.reportlab.com
https://pairlist2.pair.net/mailman/listinfo/reportlab-users
Reply all
Reply to author
Forward
0 new messages