title: No change in font face in html to pdf generation using iTextSharp
body: <p>I'm using a HTML Rich-Text Editor to help me create a template for dynamic PDF reports, and it's working fine except that it doesn't change the font-face.</p>
  
  <p>This editor is using the font tag instead of CSS styles, and I would welcome any way to programmatically change the font tags to equivalent tags using styles instead.</p>
  
  <p>HTML (yes its messy, its from a WYSIWYG editor):</p>
  
  <pre><code>&lt;div&gt;&amp;nbsp;
  &lt;br&gt;
    &lt;div align="center"&gt;
      &lt;font size="5"&gt;
        &lt;b&gt;
          &lt;br&gt;
            &lt;div align="center"&gt;
              &lt;font font-face="Times New Roman" size="5"&gt;
                &lt;b&gt;Example 
                &lt;font size="6"&gt;Chamber 
                &lt;font size="5"&gt;
                  &lt;font size="4"&gt;Website&lt;/font&gt;
                &lt;/font&gt;&lt;/font&gt;Quotes&lt;/b&gt;
              &lt;/font&gt;
              &lt;font face="Times New Roman"&gt;
                &lt;br&gt;
                  &lt;font face="Times New Roman"&gt;
                    &lt;br&gt;~
                    &lt;font face="Times New Roman" color="#0000FF"&gt;
                      &lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
                      &lt;u&gt;&amp;nbsp;[!PlanName]&amp;nbsp;&lt;/u&gt;&lt;/b&gt;
                    &lt;/font&gt;
                    &lt;font face="Times New Roman"&gt;
                      &lt;br&gt;~
                      &lt;font face="Times New Roman" color="#0000FF"&gt;
                        &lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;
                      &lt;/font&gt;
                      &lt;font face="Times New Roman" color="#0000FF"&gt;
                        &lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  
                        &lt;font color="#000000"&gt;Deductible&amp;nbsp;
                        $[!PlanDeductible]:&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/b&gt;
                      &lt;/font&gt;
                      &lt;font face="Times New Roman" color="#B0B0FF"&gt;
                      [!PlanRate]
                      &lt;br&gt;
                        &lt;font face="Times New Roman"&gt;/~/~&lt;/font&gt;
                        &lt;br&gt;
                          &lt;br&gt;
                            &lt;br&gt;
                              &lt;font face="Courier New" size="1"&gt;
                              Copyright Example.com&lt;/font&gt;
                              &lt;br&gt;
                                &lt;br&gt;
                                  &lt;font face="Arial"&gt;test&lt;/font&gt;
                                  &lt;br&gt;&lt;/br&gt;
                                &lt;/br&gt;
                              &lt;/br&gt;
                            &lt;/br&gt;
                          &lt;/br&gt;
                        &lt;/br&gt;
                      &lt;/br&gt;&lt;/font&gt;&lt;/br&gt;
                    &lt;/font&gt;&lt;/br&gt;
                  &lt;/font&gt;
                &lt;/br&gt;
              &lt;/font&gt;
            &lt;/div&gt;
          &lt;/br&gt;
        &lt;/b&gt;
      &lt;/font&gt;
    &lt;/div&gt;
  &lt;/br&gt;&lt;/div&gt;
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>public static byte[] ConvertHtmlToPdf(string html)
  {
      html = HtmlPostProcessor.Process(html);
      byte[] fileData = null;
      string tempPath = ConfigurationManager.AppSettings["TempDirectory"];
      string tempPDFFile = Path.Combine(tempPath, Guid.NewGuid() + ".pdf");
      Document document = new Document(PageSize.LETTER, 50, 50, 50, 50);
  
      using (FileStream fs = new FileStream(tempPDFFile, FileMode.Create))
      {
          PdfWriter.GetInstance(document, fs);
          using (StringReader stringReader = new StringReader(html))
          {
              List&lt;IElement&gt; parsedList = HTMLWorker.ParseToList(stringReader, null );
              document.Open();
              foreach (IElement item in parsedList)
              {
                  document.Add(item);
              }
              document.Close();
          }
      }
  
      FileStream generatedPDF = File.Open(tempPDFFile, FileMode.Open);
      fileData = new byte[(int)generatedPDF.Length]; 
      int result = generatedPDF.Read(fileData, 0, (int)generatedPDF.Length);
  
      generatedPDF.Close();
  
      File.Delete(tempPDFFile);
  
      return fileData;
  }
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've been using iTextSharp version 5.1.1.0.</p>