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
The answer starts as wkhtmltopdf 0.12.6’s does: libraries that read the version keep working.

Strengths

How it works

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.

Secure by default

wkhtmltopdf’s protections stay, and pdfkiln adds its own.

  • Local files: none but the page itself, unless --enable-local-file-access or --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 serve a 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:

SystemDelaywkhtmltopdfpdfkiln
Ubuntu 24.04200 ms0.52 s1.11 s
Ubuntu 24.041000 ms, Odoo’s2.13 s1.14 s
Windows 11 PC200 ms1.36 s1.80 s
Windows 11 PC1000 ms, Odoo’s2.91 s1.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