I'm creating a PDF where I add some text to each page as well as 2 lines that are drawn using the following method:
private void DrawLines(Document pdfDoc, PdfContentByte cb) {
cb.MoveTo(0, 562);
cb.LineTo(pdfDoc.PageSize.Width, 562);
cb.MoveTo(0, 561);
cb.LineTo(pdfDoc.PageSize.Width, 561);
}
On one specific page, there's a table where I'm using the following code to change the background color for one particular cell:
header = new PdfPCell(new Phrase(market_data_list[i], grid_data_heading));
header.Colspan = 2;
header.HorizontalAlignment = iTextSharp.text.Element.ALIGN_CENTER;
header.BackgroundColor =new BaseColor(238,233,233);
market_table.AddCell(header); //adds cell to the table
I now get the cell with the background color I specified (grey), but the lines change from black to grey... I want to draw those lines in black!