title: Convert Image into Pdf using itextsharp in c#
body: <p>I want to use itextsharp to convert a page that contain the image and gridview into pdf form. Below is my code</p>
  
  <pre><code>  string attachment = "attachment; filename=Report.pdf";
          Response.ClearContent();
          Response.AddHeader("content-disposition", attachment);
          Response.ContentType = "application/pdf";
          StringWriter stw = new StringWriter();
          HtmlTextWriter htextw = new HtmlTextWriter(stw);
          divText.RenderControl(htextw);   //image is place inside 
          GridView1.RenderControl(htextw);           
          Document document = new Document();
          PdfWriter.GetInstance(document, Response.OutputStream);
          document.Open();
          StringReader str = new StringReader(stw.ToString());
          HTMLWorker htmlworker = new HTMLWorker(document);
          htmlworker.Parse(str);
          document.Close();
          Response.Write(document);
          Response.End();
  </code></pre>
  
  <p>i managed to convert the gridview into pdf but unable to convert the image. The image is place inside the div call divText. Does anyone can help me in this?</p>