I'm trying to implement a web solution to convert a web-page to a PDF file. To deal this, I've followed these steps, but, when I've implemented this, this takes too long to load the PDF and I'm not sure if it does because it still loading until this moment.
I'm actually developing this web-app using ASP.NET MVC 4. And, my implementation is:
[HttpGet]
public ActionResult Imprimer(string type = "", string dns = "", string domaine = "", string nomPoste = "", string stats = "", string date1="",
string date2 = "")
{
return new ActionAsPdf(
"Index",
new { type = type, dns = dns, domaine = domaine, nomPoste = nomPoste, stats = stats, date1 = date1, date2 = date2 }
) { FileName = "Statistique-"+DateTime.Now.ToString()+".pdf" };
}
Knowing that the first parameter of ActionAsPdf is the web-page from here I'm executing the Imprimer action and the second parameters are request's parameters.
Can someone light up what is wrong with this?