title: iTextSharp 5.4.2 : Fixing the width of a column in a table
body: <p>I am using following code to generate PDF doc using iTextSharp library version 5.4.2. </p>
  
  <pre><code>// Create a Document object
          var document = new Document(PageSize.A4, 50, 50, 25, 25);
  
          // Create a new PdfWriter object, specifying the output stream
          var output = new MemoryStream();
          var writer = PdfWriter.GetInstance(document, output);
  
          // Open the Document for writing
          document.Open();
  
  
  
      //Gets System.Web.UI.WebControls.Table
      //Returns HTML table with 4 coulms
  
          var flowsheetTable = GetTable(report);
  
  
          var stringWriter = new StringWriter();
          using (var htmlWriter = new HtmlTextWriter(stringWriter))
          {
              flowsheetTable.RenderControl(htmlWriter);
          }
  
  
          List&lt;IElement&gt; htmlarraylist = HTMLWorker.ParseToList(new StringReader(stringWriter.ToString()), null);
          for (int k = 0; k &lt; htmlarraylist.Count; k++)
          {
              document.Add((IElement)htmlarraylist[k]);
          }
  
  
          document.Close();
  
          Response.ContentType = "application/pdf";
          Response.AddHeader("Content-Disposition", "attachment;filename=Receipt-test.pdf");
          Response.BinaryWrite(output.ToArray());
  </code></pre>
  
  <p>The method GetTable() returns a System.Web.UI.WebControls.Table which is having 4 columns. <strong>Is there any way to fix the width of first column in the table. I want first column to take 40% of total width.</strong></p>
  
  <p>Thank you</p>