如何设置表行的高度

本文关键字:高度 设置 何设置 | 更新日期: 2023-09-27 17:57:03

我不想做任何花哨的事情,但表格中的每一行都有 som 类型的填充底部。看起来字符串的末尾有一个 '。

+--------------------------------+ |First Cell | Second Cell | +--------------------------------+ |Other Cell | Other Really | | | Big Cell | +--------------------------------+

正在使用扩展方法来添加每一行,我尝试了以下评论,但它们没有按预期工作

public static void AddRow(this Table table, string[] cells)
{
    var row = table.AddRow();
    //row.HeightRule = RowHeightRule.Exactly;
    //row.Height = 20;
    //row.BottomPadding = 0;
    var i = 0;
    foreach (var cell in cells)
    {
        row.Cells[i].AddParagraph(cell);
        i++;
    }
}

如何设置表行的高度

正如

@pdfsharp团队指出的那样,有一个ParagraphFormat.SpaceAfter = 10;共同解决了这个问题。

谢谢你,@pdfsharp团队