Migration guides · .NET
Replace wkhtmltopdf with pdfkiln in Rotativa
Rotativa and Rotativa.AspNetCore render Razor views by running wkhtmltopdf.exe from a folder of the application: put pdfkiln’s programs there.
1. Install pdfkiln
From the latest release: the installer, into C:\Program Files\wkhtmltopdf, or the zip pdfkiln-<version>-windows-x64.zip, laid out as the old installer (wkhtmltopdf\bin\wkhtmltopdf.exe). 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 application’s Rotativa folder, usually wwwroot\Rotativa with Rotativa.AspNetCore.
3. Check
wkhtmltopdf --version
# wkhtmltopdf 0.12.6 (with patched qt), pdfkiln 1.0.4, Chromium 156.0.8078.80
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 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.