Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Streety 358 posts 568 karma points
    May 19, 2015 @ 10:03
    Streety
    0

    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

     

     

  • Streety 358 posts 568 karma points
    May 26, 2015 @ 18:04
    Streety
    0

    Figured this.

     

    You need to use a custom view and rebuild the page. Also use the PartialViewAs Pdf method.

Please Sign in or register to post replies

Write your reply to:

Draft