title: How to set table column width of itextSharp pdf table/document
body: <pre><code>    Document document;
      document.NewPage();
  
       System.Collections.ArrayList columnWidth = new System.Collections.ArrayList();
          for (int i = 0; i &lt; this.dataTable.Columns.Count; i++)
          {
              if (i &lt; 2)
              {
                  columnWidth.Add(2f);
              }
              else
              {
                  columnWidth.Add(1f);
              }
          }       
  
      float[] headerWidths = columnWidth.OfType&lt;float&gt;().Select(w =&gt; (float)w).ToArray();
  
      PdfPTable tableHeader = new PdfPTable(3);
      tableHeader.AddCell(GetCell(Col1Name));
      tableHeader.AddCell(GetCell(Col2Name));
      tableHeader.AddCell(GetCell(DescriptionColumnName));
  
      tableHeader.SetWidths(headerWidths);
      tableHeader.HeaderRows = 1;
  
      PopulatePDFCell(tableHeader);
      document.Add(tableHeader);
  </code></pre>
  
  <p>How can i set varying column widths for each column individually? The DescriptionColumnName width is expected to be much wider and Col1Name is not expected to be equal to Col2Name in width?</p>