-1

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++;
    }
}
Daniel
  • 9,491
  • 12
  • 50
  • 66
vicentedealencar
  • 913
  • 1
  • 10
  • 20
  • 1
    Maybe there is a `\n` at the end of your text, maybe your paragraph format has some SpaceAfter set, maybe something else. Provide a complete working sample or a MDDDL file for inspection. See also: http://www.pdfsharp.net/wiki/MigraDocDDL.ashx – I liked the old Stack Overflow Jun 18 '15 at 16:27

1 Answers1

0

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

Thank you, @pdfsharp-team

vicentedealencar
  • 913
  • 1
  • 10
  • 20