How to set heigth of table row?

595 views Asked by At

I am not trying to do anything fancy, but every row in the table has som sort of padding bottom. It looks like there is a \n in the end of the string.

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

I am using extension methods to add each row, I tryed the following comments but they didn't work as intended

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++;
    }
}
1

There are 1 answers

0
vicentedealencar On

as @pdfsharp-team pointed out, there was a ParagraphFormat.SpaceAfter = 10; that coused the issue.

Thank you, @pdfsharp-team