how can i print a web page in asp.net
<p>i am trying to convert and download webpage to a pdf file, but i am getting some error to download,my code is here,i do not have any problem if i remove image means their is no problem</p>

<pre><code>protected void btnPDF_Click(object sender, EventArgs e)
{

    Response.ContentType = "application/pdf";
    Response.AddHeader("content-disposition", "attachment;filename=UserDetails.pdf");
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    StringWriter sw = new StringWriter();
    HtmlTextWriter hw = new HtmlTextWriter(sw);
    this.Page.RenderControl(hw);
    StringReader sr = new StringReader(sw.ToString());
    Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0.0f);
    HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
    PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
    pdfDoc.Open();
    htmlparser.Parse(sr);
    pdfDoc.Close();
    Response.Write(pdfDoc);
    Response.End();
}
&lt;img src="images/addo.png" /&gt;

&lt;div style="width: 382px"&gt;
    &lt;b&gt;Export Webpage with images to pdf using itextsharp dll&lt;br /&gt;
        Student Result 2012-2013&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
    &lt;asp:GridView ID="gvDetails" runat="server" AutoGenerateColumns="False"&gt;
        &lt;Columns&gt;
            &lt;asp:BoundField DataField="UserId" HeaderText="UserId" /&gt;
            &lt;asp:BoundField DataField="UserName" HeaderText="UserName" /&gt;
            &lt;asp:BoundField DataField="Education" HeaderText="Education" /&gt;
            &lt;asp:BoundField DataField="Location" HeaderText="Location" /&gt;
        &lt;/Columns&gt;
    &lt;/asp:GridView&gt;
</code></pre>
