I have trying to generate simple pdfs from my app so that I can later move on to generating pdf with dynamic data... anyways. here's what i got.. the file is being generated but I want a way to also have the browser prompt the download of the file... (I actually dont even want to store the pdf file in my server but Im not sure how to get it to just provide it to the user without first storing it in the server drive... please help.
public ActionResult GetPDF()
{
Document document = new Document();
PdfWriter.GetInstance(document, new FileStream(Server.MapPath("../Content/test.pdf"), FileMode.Create));
document.Open();
string strHTML = "<B>I Love ASP.Net!</B>";
HTMLWorker htmlWorker = new HTMLWorker(document);
htmlWorker.Parse(new StringReader(strHTML));
document.Close();
return File(document, "application/pdf", Server.HtmlEncode(filename));//this doesnt work, obviuously
}