I was using this Rotativa 1.6.4 code example to generate a PDF from a page in my .NET MVC 5 app.
public ActionResult PrintIndex()
{
var a = new ActionAsP
I hope this code solve first question
public ActionResult DownloadViewPDF() {
Dictionary cookieCollection = new Dictionary();
foreach (var key in Request.Cookies.AllKeys)
{
cookieCollection.Add(key, Request.Cookies.Get(key).Value);
}
return new ActionAsPdf("Index")
{
FileName = "Name.pdf",
Cookies = cookieCollection
};
}