title: XMLWorker: Invalid nested tag div found, expected closing tag img
body: <p>I am just trying to add an image to my pdf document using XMLWorker. but for some reason its wanting a close img tag. but even when i put one in it still fails.</p>
  
  <p><strong>C# CODE</strong></p>
  
  <pre><code>        Byte[] bytes;
          using (var ms = new MemoryStream())
          {
              using (var doc = new Document(PageSize.A4.Rotate()))
              {
                  using (var writer = PdfWriter.GetInstance(doc, ms))
                  {
  
                      //Open the document for writing
                      doc.Open();
  
                      //Our HTML and CSS
  
                      string exampleHtml = @"&lt;div style='position: relative; width: 100%'&gt;" +
  
                                                  "&lt;img src='/Content/images/certificate.jpg'&gt;&lt;img&gt;" +
  
                                                  "&lt;div style='position: absolute; top: 100px; left: 100px; width: 800px; height: 550px; text-align: center;'&gt;" +
                                                  "&lt;h1&gt;" +
                                                  "&lt;img src='/Content/images/CertTitle.png' alt='CERTIFICATE PDF' style='width: 800px;'/&gt;" +
                                                  "&lt;/h1&gt;" +
  
  
                                                  "&lt;p&gt;" +
                                                  "The School certifies that&lt;br/&gt;" +
  
                                                  "&lt;h2&gt;FIRSTNAME LAST NAME TITLE&lt;/h2&gt;" +
  
                                                  "has participated in the class titled&lt;br /&gt;" +
  
                                                  "&lt;h2&gt;COURSCODE - COURSENAME&lt;/h2&gt;" +
  
  
                                                  "This activity was designated for # Credit(s)&amp;trade;" +
  
                                                  "&lt;/p&gt;" +
  
  
  
  
                                                  "&lt;div style='float: left;  position: absolute; bottom: 50px;'&gt;" +
                                                  "&lt;i&gt;Date issued: DATE&lt;br/&gt;&lt;/i&gt;&lt;img src='Content/images/ceo-signature.jpg' style='border-bottom: solid #000 1px;'&gt;" +
                                                  "&lt;/div&gt;" +
                                                  "&lt;/div&gt;" +
  
                                                  "&lt;/div&gt;";
  
                      using (var srHtml = new StringReader(exampleHtml))
                      {
  
                          //Parse the HTML
                          iTextSharp.tool.xml.XMLWorkerHelper.GetInstance().ParseXHtml(writer, doc, srHtml); //right here is where it crashes ({"Invalid nested tag div found, expected closing tag img."} {"The document has no pages."}
                      }
  
  
                      doc.Close();
                  }
              }
  
              bytes = ms.ToArray();
          }
  
          var testFile = HttpContext.Server.MapPath("~/Content/documents/UserCertificates/test.pdf"); ;
          System.IO.File.WriteAllBytes(testFile, bytes);
  
          Response.AddHeader("Content-Disposition", "inline; filename=test.pdf");
          return File(testFile, "application/pdf");
  </code></pre>
  
  <p>I've never used closing img tags, so I'm curious if I'm doing something wrong here?</p>