iTextSharp table width 100% of page
In iTextSharp latest version (5.0.4) the PdfPTable
has a WidthPercentage
property.
To set a static value the property is TotalWidth
.
Figured it out. Apparently table.Width
is a percent and not the width in pixels. So using:
table.Width = 100;
Worked like a charm.
Users can also set table width by Percentage.
t.WidthPercentage = 100f;