Rotativa icon indicating copy to clipboard operation
Rotativa copied to clipboard

Importing a page with JS and Windows authentication

Open Laser42 opened this issue 6 years ago • 0 comments

Hello! Thank you for the library!

I have an MVC 5 project which uses Windows authentication. In order of adding pdf export support, I try to set up Rotativa lib. The first try was Controller method

public ActionResult PrintViewToPdf()
{
    return new ActionAsPdf("myAction");
}

which results as error 401.2 page in pdf file. As i understand (please let me know if there is another solution!!!), there is the only workaround:

public ActionResult PrintViewToPdf()
{
    return new ViewAsPdf("myView");
}

In this case, I get a pdf file, but it contents a web page withount javascript scripts completed!

So, the question: is any another solution instead of replace ActionAsPdf to ViewAsPdf? If no, is it a solution to make ViewAsPdf include javascript execution results?

Thank you!

Laser42 avatar Jul 06 '18 14:07 Laser42