[reportlab-users] behaviour change from 2.5 to 3.0 (or 3.3)

Robin Becker robin at reportlab.com
Wed Jul 6 12:56:05 EDT 2016


On 06/07/2016 16:39, Yitzchak Scott-Thoennes wrote:
> I'm upgrading a server from ubuntu 12.04 (with reportlab 2.5) to 14.04
> (with reportlab 3.0) and seeing a difference I can't explain.  I'd
> appreciate it if someone else could explain it.
> I'd even more appreciate suggestions for improvement.
>
> The following code results in "X  test" horizontally aligned in 2.5 but
> puts the X a line below test in 3.0 or 3.3:
>
> from reportlab.lib.pagesizes import letter
..........
> main('output.pdf')
>
..........
I just ran the code with latest code and the python 2.7 and 3.5 versions look 
identical. However, in neither case is the X beside or below the 'text', it 
looks more like this



                  text
                 X



which given the intent of the code certainly looks wrong. Cretainly there's an 
issue with the logic of checking the width of a paragraph. Paragraphs always 
report a width equal to availWidth. I think in the modern code there's some way 
to get the actual width.

I'll take a look again tomorrow when the football is over.
-- 
Robin Becker


More information about the reportlab-users mailing list