[reportlab-users] changed font size in table

Christoph Zwerschke zwerschke at zuv.uni-heidelberg.de
Wed Mar 2 05:50:22 EST 2005


>> Actually, setting 'VALIGN' to 'BOTTOM' was an attempt to move the text 
>> down in the cells. The text rides high in the cells and setting 
>> 'VALIGN' has no effect. In fact, if I didn't set the rowHeights, the 
>> text would be partially out of the top of each cell.

Tom, I think the problem is that you decreased the FONTSIZE, but not the 
LEADING. So you get 3 points default bottom padding + 12 points default 
text height (leading) which is already at the top of the 15 point cell. 
Try again using a LEADING of 8, this will look better.

There will be still a small problem because a LEADING of 8 will be too 
small for a FONTSIZE of 8. So I recommend setting the LEADING to 11 and 
the TOPADDING and BOTTOMPADDING to 2. This should look nice.

The VALIGN has no effect here because in your example the LEADING and 
the PADDING already sum up to the full row height, so there is no room 
for vertical adjustment anyway.

Please also note that Reportlab had a problem with VALIGN=MIDDLE which 
has been fixed in version 1.20 only.

-- Christoph Zwerschke


More information about the reportlab-users mailing list