diff --git a/src/reportlab/platypus/tables.py b/src/reportlab/platypus/tables.py
--- a/src/reportlab/platypus/tables.py
+++ b/src/reportlab/platypus/tables.py
@@ -1462,15 +1462,17 @@
for i,flowable in enumerate(value):
flowable_height = getattr(flowable,'height',FH[i])
- if usedHeight + flowable_height <= height0:
+ if usedHeight + flowable_height + flowable.getSpaceBefore() <= height0:
newCellContent.append(flowable)
- usedHeight += flowable_height
+ usedHeight += flowable_height + flowable.getSpaceBefore() + flowable.getSpaceAfter()
else:
# This is where we need to split
- splits = flowable.split(width, height0-usedHeight)
+ splits = flowable.split(width, height0-usedHeight-flowable.getSpaceBefore())
if splits:
newCellContent.append(splits[0])
postponedContent.append(splits[1])
+ postponedContent.extend(list(value[i+1:]))
+ break
elif newCellContent and ((style.valign=='BOTTOM' and flowable_height<=height1)
or flowable.split(width,self._getPossibleHeight(height1))):
postponedContent.extend(list(value[i:]))
And after adding calls to `getSpaceBefore`/`getSpaceAfter` in the height checks, the first paragraph is correctly split. However the height of `splits[0]` is not added to `usedHeight` so the next paragraph is also split, with both paragraphs' second-halves ending up on the next page:
Given we know we need to split at this particular flowable, the easiest fix seemed to be to append the remaining flowables into `postponedContent`, then break. With that part of the patch also applied, content breaks as expected: