public void CellRendered(PdfPCell cell, Rectangle position, PdfContentByte[] canvases, CellAttributes attributes)
{
var contentByte = canvases[PdfPTable.BACKGROUNDCANVAS];
contentByte.SaveState();
if (ProgressBarColorFormula != null)
{
ProgressBarColor = ProgressBarColorFormula(attributes.RowData.TableRowData);
}
contentByte.SetColorFill(new BaseColor(ProgressBarColor.ToArgb()));
contentByte.Rectangle(
position.Left,
position.Bottom,
position.Width * getPercent(attributes) / 100,
position.Height);
contentByte.Fill();
contentByte.RestoreState();
}