Rotativa - ViewAspdf does not work on server

I found a very simple tutorial how to fix my issue with rotativa, for those which have the same issue, please follow this tutorial:

Sample process to generate PDF with Rotativa in Asp.Net MVC

based on this tutorial, all we need to do is to:

Upload dlls:

  • msvcp120.dll
  • msvcr120.dll

because Rotativa need component of "Visual C++ Redistributable for Visual Studio".

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Packages\Debugger\X64\msvcp120.dll

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Packages\Debugger\X64\msvcr120.dll

You can refer above path on your local with your own specified path to find it. Upload them to "Rotativa" folder.


I ran into the same issue: Rotativa was working for me on local, but not on our development server.

What worked for me was a combination of Lucian Bumb and Ray Levron's answers.

First I went to: https://wkhtmltopdf.org/downloads.html and downloaded the 64-bit version.

I ran the installer, found the bin folder, and copied these three files into my project's "Rotativa" folder:

  • wkhtmltoimage.exe
  • wkhtmltopdf.exe
  • wkhtmltox.dll

I then found these four .dll files on my PC running a search, and copied them into my project's "Rotativa" folder:

  • msvcp120.dll
  • msvcp140.dll
  • msvcr120.dll
  • vcruntime140.dll

Made sure all files were added to project and source control, tested local, and checked in for a build on dev.


What worked for me was, I had files missing in the Rotativa folder,

help-wkhtmltoimage.txt
help-wkhtmltopdf.txt
msvcp120.dll
msvcp140.dll
msvcr120.dll
vcruntime140.dll
wkhtmltoimage.exe
wkhtmltopdf.exe
wkhtmltox.dll

Once I put those files in, it worked like a charm