Migration guides · .NET

Replace wkhtmltopdf with pdfkiln in Rotativa

Rotativa and Rotativa.AspNetCore render Razor views to PDF by running wkhtmltopdf.exe from a folder of the application. Put pdfkiln’s programs in that folder.

1. Install pdfkiln

From the latest release: the zip pdfkiln-<version>-windows-x64.zip, which holds wkhtmltopdf\bin\wkhtmltopdf.exe as the old installer did, or the installer, which puts it in C:\Program Files\wkhtmltopdf. Uninstall wkhtmltopdf first.

2. Point Rotativa at it

Copy the content of the archive’s wkhtmltopdf\bin, the programs and the chromium\ folder beside them, into the Rotativa folder of the application, usually wwwroot\Rotativa with Rotativa.AspNetCore.

3. Check

wkhtmltopdf --version
# wkhtmltopdf 0.12.6 (with patched qt), pdfkiln <version>, Chromium <version>

The answer starts as wkhtmltopdf 0.12.6’s does: libraries that read the version keep working.

What Rotativa expects, and what pdfkiln does

Tested

Tested with Rotativa.AspNetCore’s driver, and in IIS as the application pool’s identity on Windows Server 2025 with the Desktop Experience.

Something renders differently? Open an issue with the HTML and both PDFs: github.com/Jamalofski/pdfkiln/issues. The known differences are listed in the README.