Submitting a patch
Robin Becker <[email protected]> Wed, 30 Apr 2025 08:42:28 +0100
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <[email protected]> |
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