Free and open source · MIT · Linux, Windows, macOS
The drop-in replacement for wkhtmltopdf
wkhtmltopdf is archived, with no release since 2020. pdfkiln keeps its command line and renders HTML to PDF with a current Chromium: your code does not change.
Install pdfkiln Source on GitHub
wkhtmltopdf --versionwkhtmltopdf 0.12.6 (with patched qt), pdfkiln 1.0.3, Chromium 156.0.8078.73
Strengths
- Same command line All 122 options of wkhtmltopdf 0.12.6, with its defaults, messages and exit codes.
- Same page count 32 real templates out of 32 (Odoo, ERPNext, Sylius, pandoc), and 99.1 % of the words on the same page, on Linux.
- Tested by the libraries pdfkit, knp-snappy, phpwkhtmltopdf and wicked_pdf pass their own test suites with pdfkiln.
- Up to date The latest stable Chromium in each release; on Debian and Ubuntu,
apt upgradebrings it.
How it works
- One program, two names Called
wkhtmltopdf: wkhtmltopdf 0.12.6’s command line. Calledpdfkiln: its own interface, with print settings from the page’s CSS. - Chromium in its sandbox Every conversion runs with Chromium’s sandbox on: run pdfkiln as an unprivileged user, not root.
- A call or a server One Chromium per call, or kept open by
pdfkiln servefor volume.
Install
Debian and Ubuntu
Debian 12 and 13, Ubuntu 22.04 and later, amd64 and arm64. Signed APT repository: Chromium’s security fixes arrive with apt upgrade. Replaces the wkhtmltox package.
curl -fsS https://apt.pdfkiln.org/pdfkiln-archive-keyring.asc | sudo tee /usr/share/keyrings/pdfkiln-archive-keyring.asc > /dev/null
printf 'Types: deb\nURIs: https://apt.pdfkiln.org\nSuites: stable\nComponents: main\nSigned-By: /usr/share/keyrings/pdfkiln-archive-keyring.asc\n' \
| sudo tee /etc/apt/sources.list.d/pdfkiln.sources
sudo apt update && sudo apt install pdfkiln
Windows
x64; ARM in emulation. Installer or zip, from the latest release, in C:\Program Files\wkhtmltopdf, where pdfkit and most guides look. Uninstall wkhtmltopdf first.
Windows Server: Desktop Experience required. Not signed yet, so SmartScreen warns: check the installer against the release’s SHA256SUMS.
Docker
amd64 and arm64 image, on Debian 13 slim, as an unprivileged user. Run it with seccomp.json: Docker’s default profile, plus the namespaces of Chromium’s sandbox.
curl -fsSO https://raw.githubusercontent.com/Jamalofski/pdfkiln/main/docker/seccomp.json
docker run --rm -i --security-opt seccomp=seccomp.json ghcr.io/jamalofski/pdfkiln wkhtmltopdf - - < page.html > page.pdf
PHP (Composer)
PHP 7.4 or later. wkhtmltopdf and wkhtmltoimage in vendor/bin; the program is fetched on first use, SHA-256 checked. On a Linux server, prefer the Debian package or Docker, which bring Chromium’s libraries.
composer require pdfkiln/pdfkiln
npm
Node.js 22.12 or later. Chromium is fetched on first use, SHA-256 checked.
npx @pdfkiln/pdfkiln wkhtmltopdf page.html page.pdf
npm install -g @pdfkiln/pdfkiln # pdfkiln, wkhtmltopdf and wkhtmltoimage
Linux and macOS archives
Linux x64 and ARM64, macOS ARM64, from the latest release: the program, its Chromium, wkhtmltopdf and wkhtmltoimage. On Linux, add Chromium’s system libraries; pdfkiln names any that are missing. On Debian 13 and Ubuntu 24.04:
sudo apt install libasound2t64 libatk-bridge2.0-0t64 libatk1.0-0t64 libatspi2.0-0t64 libdbus-1-3 libexpat1 libgbm1 \
libglib2.0-0t64 libnspr4 libnss3 libudev1 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 \
libxkbcommon0 libxrandr2 fontconfig fonts-liberation
Without installing anything
conv2pdf, our hosted service in France, converts HTML and web pages to PDF with pdfkiln, by API or from n8n, Zapier and Make. Separate pricing, and not wkhtmltopdf’s command line.
Releases tested by CI, with SHA-256 sums and provenance attestations: gh attestation verify <file> --repo Jamalofski/pdfkiln.
Where wkhtmltopdf no longer installs: Ubuntu 24.04 and Debian 13, ARM64 and Apple Silicon, Docker.
Migrate in five minutes
Point the library at pdfkiln’s wkhtmltopdf, never at pdfkiln, which switches to its own interface. The Debian package already puts it in the PATH.
- knp-snappy PHP
The PHP wrapper of Symfony bundles and laravel-snappy.
- laravel-snappy PHP, Laravel
knp-snappy for Laravel: two lines of
.env. - phpwkhtmltopdf PHP
mikehaertl’s wrapper: one option, or nothing.
- pdfkit Python
python-pdfkit: nothing to change if it is in the
PATH. - wicked_pdf Ruby on Rails
Drop the
wkhtmltopdf-binarygem, setexe_path. - imgkit Python
Screenshots with pdfkiln’s
wkhtmltoimage. - Odoo ERP
Reports keep their page count; nothing to configure.
- Frappe and ERPNext ERP
HTML headers and footers, with their JavaScript.
- Rotativa .NET
Rotativa.AspNetCore and IIS, on Windows.
Secure by default
wkhtmltopdf’s protections stay, and pdfkiln adds its own.
- Local files: none but the page itself, unless
--enable-local-file-accessor--allow <path>; neither..nor a symbolic link gets around--allow. --kiln-block-private-network: no loopback, private or link-local address, cloud metadata included, checked after DNS resolution. The answer to CVE-2022-35583.--kiln-timeout: the conversion and Chromium stop after 120 s by default.- Nothing shared between two calls: a fresh profile, or with
pdfkiln servea browser context of its own, deleted at the end.
Measured, not promised
A complete call on the corpus’s two-page Odoo invoice, median, against the official wkhtmltopdf 0.12.6:
| System | Delay | wkhtmltopdf | pdfkiln |
|---|---|---|---|
| Ubuntu 24.04 | 200 ms | 0.52 s | 1.11 s |
| Ubuntu 24.04 | 1000 ms, Odoo’s | 2.13 s | 1.14 s |
| Windows 11 PC | 200 ms | 1.36 s | 1.80 s |
| Windows 11 PC | 1000 ms, Odoo’s | 2.91 s | 1.85 s |
wkhtmltopdf always waits the whole --javascript-delay; pdfkiln stops as soon as the page can no longer change. pdfkiln serve saves Chromium’s start-up: 0.17 s per call on Ubuntu.
Ubuntu on GitHub Actions, CI run of 24 October 2026; Windows 11 on a 20-thread PC; node dist/bench/call.js --delay 200, then without --delay.
pdfkiln Pro · in preparation
Factur-X, PDF/A, written guarantees?
pdfkiln stays free, without limits. pdfkiln Pro adds PDF/A-3 and Factur-X from your current HTML templates, Chromium updates tested on your templates, and written fix and response times.
See pdfkiln Pro