public ActionResult Index9(int i)
{
// return new Rotativa.MVC.UrlAsPdf("http://www.Google.com") { FileName = "pagetohtml"+i+".pdf"}; //it works too;
return new Rotativa.MVC.ActionAsPdf("Index10", new { myname = "myname is " + i }) { FileName = "pagetohtml" + i + ".pdf" };
}
second function
public ActionResult Index10(string myname)
{
return Content("" + myname);
}
javascript code :
<script type="text/javascript">
$(function () {
for (var i = 0; i < 10; i++) {
window.open("@Url.Action("Index9")?i=" + i);
}
}
);
</script>
Reference with this Link
Above it worked fined for download pdf but when download more pdf like 100 pdf on one click then Timeout error came so I wanted download all pdf in zip format