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
- In IIS, the conversion runs as the application pool’s identity, with or without its profile.
- Windows Server needs the Desktop Experience: on Server Core, Chromium stops at start, and pdfkiln says so.
- The programs are not signed yet. SmartScreen warns about the installer opened from the Explorer, not about a program that IIS runs; check the archive against the release’s
SHA256SUMS. - DinkToPdf calls the C library
libwkhtmltox, which pdfkiln does not provide: a command line cannot replace it.
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.