Here is a much better example for you. I have taken the time to create a full example specifically for this problem. The code is a little bit messy, but it shows what I am talking about. The left border does the same thing as the top border if I add it in as well. Let me know if you cannot duplicate this bug or need other information. Thank you!
private void TemporaryPDF(Page page)
{
Table tableSpacer = new Table();
Row rowSpacers = tableSpacer.Rows.Add();
rowSpacers.BackgroundColor = Color.Parse("#00FF00");
AddCell(rowSpacers, null, “-1”, normalTextState);
for (int i = 0; i < 47; i++)
{
rowSpacers = tableSpacer.Rows.Add();
rowSpacers.BackgroundColor = (i % 2 == 1) ? Color.Parse("#00FF00") : Color.White;
AddCell(rowSpacers, null, i.ToString(), normalTextState);
}
page.Paragraphs.Add(tableSpacer);
Table table = new Table();
table.Margin = new MarginInfo(0, 0, 0, 9);
table.Border = new BorderInfo { Top = new GraphInfo { Color = Color.Black, LineWidth = 1 } };
table.ColumnWidths = “145 135 120”;
//Form Row
Row row = table.Rows.Add();
row.BackgroundColor = Color.Parse("#CFD4D7");
AddCell(row, null, “Form:”, level2SectionTextState);
AddCell(row, null, “Hello”, normalTextState);
AddCell(row, null, “No Information”, normalTextState);
AddCell(row, null, “No Information”, normalTextState);
//Status Row
row = table.Rows.Add();
row.BackgroundColor = Color.Parse("#CFD4D7");
//Status and Score
AddCell(row, null, "Status: ", level2SectionTextState);
Cell cell = new Cell();
AddCell(row, null, “No Information”, normalTextState);
AddCell(row, null, “No Information”, normalTextState);
AddCell(row, null, “No Information”, normalTextState);
table.RepeatingRowsCount = 1;
page.Paragraphs.Add(table);
}
private Cell AddCell(Row row, Color backgroundColor, string text = “”, TextState textState = null)
{
var cell = text != null && text.Length > 0 ? row.Cells.Add(text, textState) : row.Cells.Add();
cell.VerticalAlignment = VerticalAlignment.Top;
if (backgroundColor != null)
{
cell.BackgroundColor = backgroundColor;
}
cell.Margin = new MarginInfo(cellPadding, cellPadding, cellPadding, cellPadding);
return cell;
}