title: Add image using itextsharp
body: <p>I am trying to export data in PDF and now i try to add image in PDF using itext sharp i try this but this shows an error ..Is try below code but this shows an error when i add image in PDF file i successfully add text </p>
  
  <pre><code>Private Sub ExportGridToPDF()
  
          Dim headerText As String = "file"
  
  
          Response.ContentType = "application/pdf"
          Response.AddHeader("content-disposition", "attachment;filename=GridViewExport.pdf")
          Response.Cache.SetCacheability(HttpCacheability.NoCache)
          Dim sw As New StringWriter()
          Dim hw As New HtmlTextWriter(sw)
          GridView1.AllowPaging = False
  
          GridView1.DataBind()
          GridView1.RenderControl(hw)
          Dim sr As New StringReader(sw.ToString())
          Dim pdfDoc As New iTextSharp.text.Document(iTextSharp.text.PageSize.A1, 10.0F, 10.0F, 10.0F, 0.0F)
  
          Dim beginning As New iTextSharp.text.Chunk(headerText)
          Dim p1 As New iTextSharp.text.Phrase(beginning)
          Dim p2 As New iTextSharp.text.Phrase()
          p2.Add(p1)
          Dim p As New iTextSharp.text.Paragraph()
          p.Add(p2)
          Dim htmlparser As New HTMLWorker(pdfDoc)
          PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
  
          pdfDoc.Open()
          pdfDoc.Add(p)
  
           Dim im As Image = iTextSharp.text.Image.GetInstance(imagepath + "/mikesdotnetting.tif")
  
      pdfDoc.Add(im)
  
  
          htmlparser.Parse(sr)
          pdfDoc.Close()
          Response.Write(pdfDoc)
          Response.End()
      End Sub
  </code></pre>
  
  <p>in this part</p>
  
  <pre><code>        Dim im As Image = iTextSharp.text.Image.GetInstance(imagepath + "/mikesdotnetting.tif")
  
      pdfDoc.Add(im)
  </code></pre>
  
  <p>and this shows an error in this line </p>
  
  <pre><code> Dim jpg As Image = iTextSharp.text.Image.GetInstance(New Uri(url))
  </code></pre>
  
  <p>error</p>
  
  <pre><code> **Value of type 'iTextSharp.text.Image' cannot be converted to 'System.Web.UI.WebControls.Image'.**    
  </code></pre>
  
  <p>Any Solution?</p>