Converting HTML to pdf and save it to given location without opening "Save As" or "Download" window <p>I am converting html into pdf. It is working fine. but when i try to save html into any location it gives me error <code>Network path not found</code>. I am having some line of code</p> <pre><code> #region Trying to convert pdf Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment;filename=Panel.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache); StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); StringReader sr = new StringReader(htmlStringToConvert); iTextSharp.text.Document pdfDoc = new iTextSharp.text.Document(iTextSharp.text.PageSize.A4, 10f, 10f, 100f, 0f); HTMLWorker htmlparser = new HTMLWorker(pdfDoc); PdfWriter writer = PdfWriter.GetInstance(pdfDoc, Response.OutputStream); pdfDoc.Open(); htmlparser.Parse(sr); pdfDoc.Close(); Response.Write(pdfDoc); Response.End(); #endregion </code></pre> <p>I am getting error at <code>htmlparser.Parse(sr)</code>.</p> <p>Thanks in advance</p>