title: table width not set in iTextSharp when converting html to PDF
body: <p>I am trying to convert an html to pdf but the problem i face is that the html table tags width is not getting set correctly..</p>
  
  <p>This is my html</p>
  
  <pre><code>&lt;table cellpadding='4' cellspacing='4' border='0' width='100%' style='width:100%'&gt;
      &lt;tr style='background-color:#000000'&gt;
          &lt;td colspan='2' align='center' valign='middle' width='100%'&gt;
              &lt;font face='Calibri' size='6' color='#FFFFFF'&gt;Retail Natural Gas Deal Sheet&lt;/font&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td colspan='2' width='100%'&gt;&amp;nbsp;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td width='90%' style='width:90%'&gt;
              &lt;table cellpadding='0' cellspacing='0' border='0' width='100%'&gt;
                  &lt;tr&gt;
                      &lt;td width='42%'&gt;
                          &lt;font face='Calibri' size='4'&gt;
                              &lt;b&gt;Deal Number&lt;/b&gt;
                          &lt;/font&gt;
                      &lt;/td&gt;
                      &lt;td width='1%'&gt;&amp;nbsp;&lt;/td&gt;
                      &lt;td width='57%'&gt;
                          &lt;font face='Calibri' size='4'&gt;
                              &lt;b&gt;15RTLG7149&lt;/b&gt;
                          &lt;/font&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td colspan='3' width='100%'&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td width='42%'&gt;
                          &lt;font face='Calibri' size='2'&gt;
                              &lt;b&gt;Trade Date&lt;/b&gt;
                          &lt;/font&gt;
                      &lt;/td&gt;
                      &lt;td width='1%'&gt;&amp;nbsp;&lt;/td&gt;
                      &lt;td width='57%'&gt;
                          &lt;font face='Calibri' size='2'&gt;February 09, 2015&lt;/font&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td width='42%'&gt;
                          &lt;font face='Calibri' size='2'&gt;
                              &lt;b&gt;Price Date&lt;/b&gt;
                          &lt;/font&gt;
                      &lt;/td&gt;
                      &lt;td width='1%'&gt;&amp;nbsp;&lt;/td&gt;
                      &lt;td width='57%'&gt;
                          &lt;font face='Calibri' size='2'&gt;February 09, 2015&lt;/font&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td width='42%'&gt;
                          &lt;font face='Calibri' size='2'&gt;
                              &lt;b&gt;Authorize Date&lt;/b&gt;
                          &lt;/font&gt;
                      &lt;/td&gt;
                      &lt;td width='1%'&gt;&amp;nbsp;&lt;/td&gt;
                      &lt;td width='57%'&gt;
                          &lt;font face='Calibri' size='2'&gt;February 09, 2015&lt;/font&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td colspan='3' width='100%'&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/td&gt;
          &lt;td width='10%' style='width:10%' valign='top'&gt;
              &lt;table cellpadding='0' cellspacing='0' border='0' width='100%'&gt;
                  &lt;tr&gt;
                      &lt;td colspan='2' align='center' width='100%'&gt;
                          &lt;font face='Calibri' size='2'&gt;
                              &lt;b&gt;Volumes (MMMBtu)&lt;/b&gt;
                          &lt;/font&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>this is the c# code i am using to generate the pdf</p>
  
  <pre><code>        Document pdfDoc = new Document();
          //Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 10f, 0f);
          //HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
          using (MemoryStream memoryStream = new MemoryStream())
          {
              PdfWriter writer = PdfWriter.GetInstance(pdfDoc, memoryStream);
              pdfDoc.Open();
              XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, new StringReader(HTML));
              pdfDoc.Close();
              byte[] bytes = memoryStream.ToArray();
              memoryStream.Close();
  
              return bytes;
          }
  </code></pre>
  
  <p>but this is how its rendered in the pdf.. I am not able to find the right answers.. I need help.. Thanks in advance..</p>
  
  <p><a href="http://i.stack.imgur.com/8WyBh.jpg" rel="nofollow">http://i.stack.imgur.com/8WyBh.jpg</a></p>