Getting Return View from Umbraco 7 MVC into Rotativa
No doubt a daft question, but I am trying to use Rotativa which is a PDF creation tool for MVC. Works great on a standard MVC project but with Umbraco I am struggling to find an easy implementation.
This is mainly because you need to pass in a View of the page to render to Rotativa in your ActionResult
return new Rotativa.ActionAsPdf("Index");
With Umbraco being auto routed and all that's a little tricky as I don't have access to it in the SurfaceController.
I looked at Custom Controllers and returning the base.index(model) but the model was empty.
Getting Return View from Umbraco 7 MVC into Rotativa
No doubt a daft question, but I am trying to use Rotativa which is a PDF creation tool for MVC. Works great on a standard MVC project but with Umbraco I am struggling to find an easy implementation.
This is mainly because you need to pass in a View of the page to render to Rotativa in your ActionResult
return new Rotativa.ActionAsPdf("Index");
With Umbraco being auto routed and all that's a little tricky as I don't have access to it in the SurfaceController.
I looked at Custom Controllers and returning the base.index(model) but the model was empty.
Any help would be welcome
Figured this.
You need to use a custom view and rebuild the page. Also use the PartialViewAs Pdf method.
is working on a reply...