我添加了一个两行两列的表格,并为所有单元格设置边框。但它仅显示第一列的边框
示例代码如下所示
var tableestdet = new Table { ColumnWidths = "120,120", Margin = new MarginInfo { Top = 40, Left = 10 },
DefaultCellBorder = new BorderInfo((int)BorderSide.All, 1F), }; tableestdet.DefaultCellTextInfo = new TextInfo { Alignment = AlignmentType.Center }; var estdet1 = tableestdet.Rows.Add(); estdet1.DefaultRowCellPadding = new MarginInfo { Top = 5, Bottom = 5 }; var req=estdet1.Cells.Add("Requested By:"); var estde=estdet1.Cells.Add("Entered By:"); var estdet2 = tableestdet.Rows.Add(); estdet2.DefaultCellTextInfo = new TextInfo { FontSize = 8, Alignment = AlignmentType.Center }; estdet2.DefaultRowCellPadding = new MarginInfo { Top = 5, Bottom = 5 }; estdet2.Cells.Add(Requestedby); estdet2.Cells.Add(CustomerName); sec1.Paragraphs.Add(tableestdet);