How can I create a space after a table row with itextsharp?

c#, itext

Solution

if you want to add blank row as i understand please: Try this:

PdfPTable table = new PdfPTable(3);
PdfPCell cell = new PdfPCell(new Phrase("Header spanning 3 columns"));
cell.Colspan = 3;
cell.HorizontalAlignment = 1; //0=Left, 1=Centre, 2=Right
table.AddCell(cell);
table.AddCell("Col 1 Row 1");
table.AddCell("Col 2 Row 1");
table.AddCell("Col 3 Row 1");

PdfPCell cellBlankRow = new PdfPCell(new Phrase(" "));
cell.Colspan = 3;
cell.HorizontalAlignment = 1;
table.AddCell(cellBlankRow);
table.AddCell("");
table.AddCell("");

table.AddCell("Col 1 Row 2");
table.AddCell("Col 2 Row 2");
table.AddCell("Col 3 Row 2");

Just insert blank rows using `Phrase`. I have tested and works fine..! If i am misunderstand please let me know..!

Problem

I have a very simple itextsharp table like this: ``` PdfPTable table = new PdfPTable(3); PdfPCell cell = new PdfPCell(new Phrase("Header spanning 3 columns")); cell.Colspan = 3; cell.HorizontalAlignment = 1; table.AddCell(cell); table.AddCell("Col 1 Row 1"); table.AddCell("Col 2 Row 1"); table.AddCell("Col 3 Row 1"); // Create spacing after row here only. table.AddCell("Col 1 Row 2"); table.AddCell("Col 2 Row 2"); table.AddCell("Col 3 Row 2"); doc.Add(table); ``` How can I create a space between row 1 and row 2 only? Thanks.

Original source