diff --git a/QuestPDF/Elements/Table/Table.cs b/QuestPDF/Elements/Table/Table.cs index e9b7983..6fca6e5 100644 --- a/QuestPDF/Elements/Table/Table.cs +++ b/QuestPDF/Elements/Table/Table.cs @@ -205,10 +205,12 @@ namespace QuestPDF.Elements.Table return commands.Where(x => x.Cell.Row <= maxRenderingRow).ToList(); } - // if two cells end up on the same row (a.Row + a.RowSpan = b.Row + b.RowSpan), + // corner sase: if two cells end up on the same row (a.Row + a.RowSpan = b.Row + b.RowSpan), // bottom edges of their bounding boxes should be at the same level static void AdjustCellSizes(float tableHeight, ICollection commands) { + // TODO: this is wrong + // should use GroupBy(x => x.Row + x.RowSpan) and determine target height foreach (var command in commands) { var height = tableHeight - command.Offset.Y; @@ -216,7 +218,7 @@ namespace QuestPDF.Elements.Table } } - // all cells, that are last ones in their respective columns, should take all remaining space + // corner sase: all cells, that are last ones in their respective columns, should take all remaining space static void AdjustLastCellSizes(float tableHeight, ICollection commands) { var columnsCount = commands.Select(x => x.Cell).Max(x => x.Column + x.ColumnSpan - 1); @@ -241,4 +243,4 @@ namespace QuestPDF.Elements.Table } } } -} \ No newline at end of file +}