title: Working with itextsharp with htmls table
body: <p>I have got HTML working with itextsharp to create a PDF with the following code, however I can't add emtpy rows or changing width of td by using width. Here is the code that I use</p>
  
  <pre><code>string customer = "客";
          string address = "地";
          int page = 0;
          DateTime today = DateTime.Now;
          double lastMonthLeft = 0.0;
          double twoMonthsLeft = 0.0;
          double threeMonthsLeft = 0.0;
          double thisMonthLeft = 0.0;
          double fourAboveLeft = 0.0;
          string handleMan = "";
          DateTime startPick = StartTimePicker.SelectionRange.Start;
          DateTime endPick = EndTimePicker.SelectionRange.Start;
          DateTime beginning = new DateTime(startPick.Year, startPick.Month, startPick.Day, 00, 00, 01);
          DateTime ending = new DateTime(endPick.Year, endPick.Month, endPick.Day, 23, 59, 59);
          string path = "C:\\Users\\Benjiw\\Desktop\\test.pdf";
          StringBuilder sb = new StringBuilder();
          sb.Append("&lt;html&gt;&lt;body&gt;&lt;table border=\"1\" width=\"100%\" cellspacing=\"0\"&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td colspan=\"3\" align=\"center\" font size=\"5\"&gt;ccc&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td colspan=\"3\" align=\"center\" &gt;bbb&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td colspan=\"3\" align=\"center\" &gt;aaa&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td colspan=\"3\" align=\"center\" &gt;Rddd&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;TEL: 123123&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;FAX: 32321&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;  &lt;td&gt;   &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;/table&gt;");
  
          sb.Append("&lt;table border=\"1\" width=\"100%\" cellspacing=\"0\"&gt;");
          sb.Append("&lt;tr&gt;&lt;td&gt;致   :&lt;/td&gt;&lt;td&gt;" + customer + "&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;日期         :&lt;/td&gt;&lt;td&gt;" + today.ToString("MMMM dd yyyy") + "&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;tr&gt;&lt;td&gt;地址   :&lt;/td&gt;&lt;td colspan=\"2\"&gt;" + address + "&lt;/td&gt;&lt;td&gt;發票號碼         :&lt;/td&gt;&lt;td&gt;" + today.ToString("MMMM dd yyyy") + "&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td align=\"center\" colspan=\"3\"&gt;INVOICE&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td align=\"center\" colspan=\"3\"&gt;發票&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
  
  
          sb.Append("&lt;/table&gt;");
          sb.Append("&lt;table border=\"1\" width=\"100%\" cellspacing=\"0\"&gt;");
          sb.Append("&lt;tr&gt;&lt;td colspan=\"7\"&gt;======================================================================================&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;tr&gt;&lt;td style=\"width:5px;\"&gt;單號&lt;/td&gt;&lt;td width=\"5%\"&gt;日期&lt;/td&gt;&lt;td width=\"5%\"&gt;貨品&lt;/td&gt;&lt;td width=\"5%\" colspan=\"2\"&gt;數量&lt;/td&gt;&lt;td width=\"5%\"&gt;單價(HK$)&lt;/td&gt;&lt;td width=\"75%\"&gt;金額(HK$)&lt;/td&gt;&lt;/tr&gt;");
          sb.Append("&lt;tr&gt;&lt;td colspan=\"7\"&gt;======================================================================================&lt;/td&gt;&lt;/tr&gt;");
  
  
  
          sb.Append("&lt;tr&gt;&lt;td colspan=\"7\"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;1&lt;\td&gt;&lt;\tr&gt;");  &lt;---------- this is where i wanna insert some white space
          sb.Append("&lt;/table&gt;");
  
          sb.Append("&lt;/body&gt;&lt;/html&gt;");
          iTextSharp.text.FontFactory.Register(Environment.GetEnvironmentVariable("windir") + "\\Fonts\\KAIU.TTF", "KAIU");
          iTextSharp.text.html.simpleparser.StyleSheet style = new iTextSharp.text.html.simpleparser.StyleSheet();
  
          style.LoadTagStyle("body", "face", "KAIU");
          style.LoadTagStyle("body", "encoding", "Identity-H");
          style.LoadTagStyle("body", "leading", "12,0");
  
  
          style.LoadTagStyle("td", "face", "KAIU");
          style.LoadTagStyle("td", "encoding", "Identity-H");
          style.LoadTagStyle("td", "leading", "18,0");
  
          iTextSharp.text.Document document = new iTextSharp.text.Document();
          document.SetPageSize(iTextSharp.text.PageSize.A4);
  
          iTextSharp.text.pdf.PdfWriter.GetInstance(document, (new FileStream(path, FileMode.Create)));
          document.Open();
          iTextSharp.text.html.simpleparser.HTMLWorker hw = new iTextSharp.text.html.simpleparser.HTMLWorker(document, null, style);
          hw.Parse(new StringReader(sb.ToString()));
  
          //document.NewPage();
          //hw.Parse(new StringReader(htmlText));
  
          document.Close();
  </code></pre>
  
  <p>I tried to add <br> but it doesn't have the same height as one data row,  please let me know how I can get that done and also setting the width of the column
  thanks </p>