public SetWidths ( float relativeWidths ) : void | ||
relativeWidths | float | |
return | void |
PdfPTable table = new PdfPTable(3); table.SetWidths(new float[] { 1f, 2f, 3f });
PdfPTable table = new PdfPTable(4); table.SetWidths(new float[] { 2f, 1f, 3f, 1f });In this example, we create a new PdfPTable with 4 columns and set the width of each column to 2, 1, 3, and 1 respectively. The library package used in these examples is iTextSharp.text.pdf.