public static void AddDefaultEmptyDataSourceTable(Document pdfDoc, IPdfFont pdfRptFont, PdfRunDirection? runDirection, string message = "There is no data available to display.")
{
var table = SimpleTable(
columnsNumber: 1,
pdfCellAttributesList: new List<CellAttributes>
{
null,
new CellAttributes
{
RowData = new CellRowData
{
Value = message
},
ItemTemplate = new TextBlockField(),
BasicProperties = new CellBasicProperties
{
BackgroundColor = BaseColor.WHITE,
HorizontalAlignment = HorizontalAlignment.Center,
ShowBorder = false,
RunDirection = runDirection.HasValue? runDirection.Value : PdfRunDirection.LeftToRight,
PdfFont = pdfRptFont,
FontColor = new BaseColor(Color.Black.ToArgb()),
}
},
null
},
showBorder: true
);
pdfDoc.Add(table);
}