Hi,
It's better to use code behind rather than HTML to show tables on PDF page. It provides flexibility to design your tables.
follow these code to solve your problem:
PdfPTable table = new PdfPTable(5);
float[] widths = new float[] { 100f, 80f, 100f, 90f, 130f };
table.SetWidths(widths);
table.AddCell("Name");
table.AddCell("Age");
table.AddCell("Band");
table.AddCell("Designation");
table.AddCell("Current Project");
table.AddCell(emp.Name);
table.AddCell(emp.Age.ToString());
table.AddCell(emp.Band);
table.AddCell(emp.Designation);
table.AddCell(emp.Project);
document.Add(table);
To get more information check this link:
How to download pdf in MVC[
^]