Last Updated: February 25, 2016
·
2.799K
· merys

Rendering MVC View in PDF

For rendering View in pdf format: ROTATIVA!

It's simple: i have a simple view "PrintView" and an Action as is:

public ActionResult Export(Model myModel)
{
    return new Rotativa.ViewAsPdf("PrintView", myModel);
}

It's works!!

2 Responses
Add your response

Cool beans! Suggest a minor tweak to the example, tho - fix the param name for the model passed to the ViewAsPdf method.

over 1 year ago ·

Oh-oh!!! Kekeli, i'm agree with you.. i need a vacation ;) FIXED!

over 1 year ago ·