title: Html Written to pdf is not in proper format
body: <p>I am using the following code to write html to pdf using iTextSharp.text. </p>
  
  <p>But my html format in pdf file is not as they are showing in the html. Design is not coming properly. </p>
  
  <p>What should I do to show the proper design in pdf?</p>
  
  <pre><code>Document document = new Document(PageSize.A4_LANDSCAPE, 0, 0, 30, 65);
  PdfWriter.GetInstance(document, new FileStream(Server.MapPath("/") + "Temp/" + "parsetest1.pdf", FileMode.Create));
  document.Open();
  String htmlText = "&lt;div style='margin: 20px auto; width: 300px; font-family: Arial, Helvetica, sans-serif;'&gt;&lt;div style='background: rgb(216, 216, 216); padding: 7px;'&gt;&lt;div style='background: rgb(255, 255, 255); padding: 10px; width: 57px; float: left;'&gt;&lt;img alt='barcode' src='images/abc.png'&gt;&lt;/div&gt;&lt;div style='width: 7px; height: 7px; float: left;'&gt;&lt;/div&gt;         &lt;div style='width: 166px; float: right;'&gt;&lt;div style='background: rgb(255, 255, 255); padding: 10px;' align='center'&gt;&lt;img alt='img' src='images/photpath.png'&gt;&lt;div style='clear: both;'&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style='background: rgb(255, 255, 255); padding: 10px; margin-top: 7px;' align='center'&gt;&lt;div style='color: rgb(157, 157, 157); font-size: 12px; float: left;'&gt;Name&lt;/div&gt;&lt;div style='width: 146px; text-align: center; color: rgb(0, 0, 0); clear: both; font-size: 14px; margin-top: 10px; float: left;' align='center'&gt;&lt;strong&gt;dalvirsaini&lt;/strong&gt;&lt;/div&gt;&lt;div style='clear: both;'&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style='background: rgb(255, 255, 255); padding: 10px; margin-top: 7px;' align='center'&gt;&lt;div style='color: rgb(157, 157, 157); font-size: 12px; float: left;'&gt;Description&lt;/div&gt;&lt;div style='width: 146px; text-align: center; color: rgb(0, 0, 0); clear: both; font-size: 14px; margin-top: 10px; float: left;' align='center'&gt;&lt;strong&gt;Payment Status&lt;/strong&gt;&lt;/div&gt;&lt;div style='clear: both;'&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style='background: rgb(255, 255, 255); padding: 10px; height: 89px; margin-top: 7px;' align='center'&gt;&lt;img alt='ScanCode' src='images/abc2.png'&gt;&lt;div style='clear: both;'&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style='clear: both;'&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style='clear: both;'&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style='clear: both;'&gt;&lt;/div&gt;&lt;/div&gt;";
  StringReader abc = new StringReader(htmlText);
  List&lt;iTextSharp.text.IElement&gt; elements = iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(abc, null);
  foreach (object item in elements)
  {
    document.Add((IElement)item);
  }
  document.Close();
  </code></pre>