【发布时间】:2012-02-23 16:28:13
【问题描述】:
如何设置表格单元格的边框颜色。这是我的代码:
// create and define table
var table = new PdfPTable(8);
table.HorizontalAlignment = Element.ALIGN_CENTER;
//table.HeaderRows = 1;
// the cell object
PdfPCell cell;
var f = FontFactory.GetFont("Tahoma", 11, Font.BOLD);
cell = new PdfPCell(new Phrase("Source Review", f));
cell.BorderColorLeft = new BaseColor(255, 255, 255);
cell.BorderColorRight = new iTextSharp.text.BaseColor(255, 255, 255);
table.AddCell(cell);
如您所见,我以两种不同的方式设置颜色,但两种方式都不起作用。渲染表格时,边框始终为黑色。我该如何解决这个问题。
【问题讨论】: