title: Show text on image in PDF using itextsharp
body: <p>I have generated a PDF using the HTMLWorker of iTextsharp. In PDF I want to show text on image marking specific area. For that, I have used div tag with the position but it not showing text on the image, but if I run the same HTML in the browser then it shows text on an image on specific location.</p>
  
  <p>Below is my code which I used to generate the PDF:</p>
  
  <pre><code>StringBuilder sReportHeader = new StringBuilder();
  
  sReportHeader.Append("&lt;table style=\"table-layout:fixed\" width=\"100%\" style=\"font-family:Verdana;font-size:8px;\"&gt;" +
                          "&lt;tr&gt;" +
                              "&lt;td align=\"left\"&gt;" + @"&lt;img src=\"http://localhost/img/image1.jpg\" width=\"520\"&gt;&lt;/img&gt;&lt;/td&gt;" +
                          "&lt;/tr&gt;" +
                      "&lt;/table&gt;" +
                      "&lt;div id=\"divArea1\" style=\"position:absolute;left:50px;top:250px;font-weight:bold;\"&gt;Area1&lt;/div&gt;");
  
  MemoryStream workStream = new MemoryStream();
  Document document = new Document();
  var worker = new HTMLWorker(document);
  var pdfWriter = PdfWriter.GetInstance(document, workStream);
  document.Open();
  worker.StartDocument();
  pdfWriter.CloseStream = false;
  TwoColumnHeaderFooter twopdf = new TwoColumnHeaderFooter();
  pdfWriter.PageEvent = twopdf;
  twopdf.OnOpenDocument(pdfWriter, document);
  worker.Parse(new StringReader(sReportHeader.ToString()));
  worker.EndDocument();
  worker.Close();
  document.CloseDocument();
  document.Close();
  
  byte[] byteInfo = workStream.ToArray();
  workStream.Write(byteInfo, 0, byteInfo.Length);
  workStream.Position = 0;
  pdfWriter.Flush();
  pdfWriter.Close();
  
  return new FileStreamResult(workStream, "application/pdf");
  </code></pre>
  
  <blockquote>
    <p>Is there anything which I missing in my code? Or is there another way
    to show text on the image using iTextsharp?</p>
  </blockquote>
  
  <pre><code>iTextsharp: Version 5.5.13.0
  </code></pre>
  
  <p>Below is the HTML which work correctly in browser:</p>
  
  <pre><code>&lt;table style="table-layout:fixed" width="100%" style="font-family:Verdana;font-size:8px;"&gt;
      &lt;tr&gt;
          &lt;td align="left"&gt;&lt;img src="http://localhost/TheAutoAuction/img/image1.jpg" width="520"&gt;&lt;/img&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;div id="divArea1" style="position:absolute;left:50px;top:250px;;font-weight:bold;"&gt;Area1&lt;/div&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hrRl7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hrRl7.png" alt="enter image description here"></a></p>