Hi,
I want to write a table in a pdf file. I am using the PdfLightTable class to write the data, and I've set the styles for the header and cells using the PdfCellStyle class:
var headerStyle = new PdfCellStyle
{
BackgroundBrush = new PdfSolidBrush(new PdfColor(new Color()) {R = 109, G = 175, B = 61}),
BorderPen = new PdfPen(new PdfColor(new Color()){ R = 109, G = 175, B = 61 })
};
var defaultStyle = new PdfCellStyle
{
TextBrush = PdfBrushes.Black,
BorderPen =PdfPen(new PdfColor(new Color()){ R = 109, G = 175, B = 61 })
};
var pdfLightTable = new PdfLightTable
{
Style =
{
BorderPen= new PdfPen(new PdfColor(new Color()){ R = 109, G = 175, B = 61 })
ShowHeader=true,
RepeatHeader=true,
HeaderStyle=headerStyle,
DefaultStyle=defaultStyle
}
};
But the table is rendered without the borders or the header bakcground color.
Thanks,
Catalina