[reportlab-users] Ascent, descent and tables

Andy Robinson andy at reportlab.com
Thu May 21 12:23:53 EDT 2009

Marius, thanks for bringing this up, and producing examples. At
various points in the last 2 years I have briefly half-understood this
issue, then forgotten it again. We made necessary "improvements" to
paragraphs to support inline images and equations for Wikipedia and to
adjust inter-line heights within paragraphs, but it seems that in the
process we are now reporting a bounding box for the paragraph that
extends too far down.

I amended test_platypus_tables.py which now produces the attached PDF.
I also added a pink background so you can see the boundary reported
by the paragraph. The paragraph claims to be using a chunk of space
beneath the lowest descender.

(BTW, before the change, the paragraphs used to claim to be using
extra space ABOVE the highest extender, because of the approximation
Robin refers to).

We will try to change things so that (a) paragraphs report their
bounding box as precisely as possible, and tables can then center this
box vertically; and (b) paragraphs try to position naked text the same
way they would position a one-line paragraph with the same font size
and "leading". This might take a few days, and we will also need to
look at preformatted blocks and labels in charts.

If anyone knows of other problems not covered by this test case,
please let me know...

- Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_platypus_tables.pdf
Type: application/pdf
Size: 5979 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20090521/957b3746/attachment.pdf>

More information about the reportlab-users mailing list