Open colejohnson66 opened 1 year ago
It seems the area check should be before the keep together/next check. We want to see if the table overflows before seeing if the next item should be computed. Regardless, the table has a rendered size of negative one point, so the overflow calculation never happens.
The X and Y values are correct; That's where the table would be if it didn't overflow. 3/4 inch margin on the left, and about 10 inches down the page.
As the title says, using
ParagraphFormat.KeepWithNext
andKeepTogether
doesn't work if the next element is a table.We've found that
TopDownFormatter.NextElementsDontFit
, when checking if the table is kept with the paragraph, the condition below evaluates totrue
and returns. Skipping over the block and moving to the next line causes the paragraph header to be kept with the table.https://github.com/ststeiger/PdfSharpCore/blob/8b9076c465123bc195c0d844dcec81eafae4fa3f/MigraDocCore.Rendering/MigraDoc.Rendering/TopDownFormatter.cs#L330-L331