Refered from Removing a "Print" button Before Rendering PDF from View - MVC3
Can anyone please provide the controller part of this answer??
Thanks in advance.. Merin
Refered from Removing a "Print" button Before Rendering PDF from View - MVC3
Can anyone please provide the controller part of this answer??
Thanks in advance.. Merin
 
    
    i dont think anyone can provide the controller but here is something that can help. You can install Rotativa for that purpose then create two actions like
public ActionResult Page(int id)
{
    var data =  //here you will get data from database by id
    return View(data);
}
public ActionResult PrintPage(int Id)
{
  return new ActionAsPdf(
                 "Page", 
                 new { id= Id}) 
                 { FileName = "Page.pdf" };
}
and also there will be view of name Page in which data will be populated when it will return the view of action Page it will be converted to pdf
