[reportlab-users] Table cell contents misaligned (RLTK > 2.0)
Yves Forkl
Y.Forkl at srz.de
Thu Apr 2 10:22:15 EDT 2009
Hello,
some time ago I set up an application using RLTK 2.0. Trying to migrate
it to RLTK 2.3, I discovered that RLTK 2.3 behaves differently:
I'm using Platypus to build up a table. In each row, some of the cells
contain a Paragraph instance, other cells just receive a string. Now
with RLTK 2.3 (but not with RLTK 2.0), the "Paragraph cells" have their
baseline shifted up a bit (vertically aligned to the middle??).
The font size, font name and leading are the same for both types of
cells, i.e. my TableStyle instance (applying to the string-only cells)
uses the same values for these parameters as does my ParagraphStyle
instance.
Why did Platypus change its behaviour here?
I've looked for a way to directly influence vertical alignment, but did
not find any. As a workaround, I have empirically determined that I need
to decrease the Paragraph leading to 4.71 while keeping the general
table leading at 7 (with a font size of 8 in both) to make the baselines
align again...
(NB: I don't use TOPPADDING or BOTTOMPADDING at all. Tried to fiddle
with them once by setting them to 0, but that did not align the
baselines again.)
Does anybody know of a real solution that could replace my clumsy
workaround?
Yves
More information about the reportlab-users
mailing list