The following code is the reproduction of the problem. The program hangs on the call to Draw(). If we don't set the Column widths then the code executes fine. Seems to work fine with PDFGrid.
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(ConfigurationManager.AppSettings["Licensing:SyncfusionLicenseKey"]);
var doc = new PdfDocument();
var page = doc.Pages.Add();
var graphics = page.Graphics;
var xPos = 0;
var yPos = 0;
DataTable dataTable = new DataTable();
dataTable.Columns.Add(new DataColumn("ABC"));
dataTable.Columns.Add(new DataColumn("XYZ"));
for (int i = 0; i < 3; i++)
{
DataRow dr = dataTable.NewRow();
dr[0] = "ABC";
dr[1] = "XYZ";
dataTable.Rows.Add(dr);
}
PdfLightTable table = new PdfLightTable
{
DataSource = dataTable
};
table.Style.ShowHeader = true;
table.Style.CellPadding = 3;
table.Columns[0].Width = 3;
table.Columns[1].Width = 12;
var tableWidth = graphics.ClientSize.Width - 10;
var resultsTable = table.Draw(page, xPos, yPos, tableWidth);
Console.WriteLine(resultsTable);