title: Generating html to pdf using itextsharp
body: <pre><code>public void pdfgenforffd(TextBox TextBox3, HiddenField HiddenField1, HiddenField HiddenField4, AjaxControlToolkit.HTMLEditor.Editor Editor1)
  {
  
      HttpContext.Current.Response.Clear();
      HttpContext.Current.Response.ContentType = "application/pdf";
      // Create PDF document
      Document pdfDocument = new Document(PageSize.A4, 50, 25, 15, 10);
  
      PdfWriter wri = PdfWriter.GetInstance(pdfDocument, new FileStream("d://" + HiddenField1.Value + "_" + HiddenField4.Value + ".pdf", FileMode.Create));
  
      PdfWriter.GetInstance(pdfDocument, HttpContext.Current.Response.OutputStream);
  
      pdfDocument.Open();
      string htmlText = Editor1.Content;
      //string htmlText = htmlText1.Replace(Environment.NewLine, "&lt;br/&gt;");
  
      HTMLWorker htmlWorker = new HTMLWorker(pdfDocument);
  
      htmlWorker.Parse(new StringReader(htmlText));
  
  
      pdfDocument.Close();
      HttpContext.Current.Response.End();
  }
  </code></pre>
  
  <p>i am using the above code for pdf generation from html text in HTMLEditor(ajax control). If i hardcode a table with each column of different width, into HTMLEditor text than while generating pdf the column get devided equally i.e all column have fixed size on pdf even if i specify some custom width for each column.</p>
  
  <p>I want to generate pdf that can convert html to pdf,also divide table column with specified width. How to do it?</p>