[reportlab-users] Submitting a patch
Robin Becker
robin at reportlab.com
Wed Apr 30 03:42:28 EDT 2025
Hi James,
I'm not sure which reportlab-users list you posted to. We have our own users group list for a long time and it's not a
google group. Perhaps it ought to be, but google seems to co-opt, embrace and extinguish just like M$ used to. No doubt
reddit has a reportlab section :(
Anyhow I understand the issue youicate. The table cell/row splitting code was a contribution and is really hard to
understand.
The problem with just adding space before and space after in the height checking is that it's not always needed.
So if a flowable is going to be the last at the end of a split cell then clearly space after doesn't matter since it
would just be wasted. Of course that's assuming that the split is meaningful ie is like flipping to a new page.
Similarly space before is irrelevant when it comes at the start of part two of a split.
The reportlab model is just wrong when it comes to glue elements.
Perhaps it's easier to ignore these difficulties and add the space as you suggest. I tried your patch and nothing broke
in the tests.
I think the main change is the addition of postponedContent.extend(list(value[i+1:])) since we could just reduce
spaceBefore/After to zero.
If you can a small test illustrating the space issue would be useful. So I guess that's a cell with two paragraphs in it
and we want to split in the first.
--
Robin Becker
More information about the reportlab-users
mailing list