Updated: 28 September 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9
wkhtmltopdf turned HTML pages into PDF files. The project was archived in January 2023 and gets no more fixes; its old WebKit engine also has known security problems. For new work, use a maintained alternative.
Alternatives
- Headless Chrome/Chromium: prints pages exactly as a modern browser renders them. From PHP use a library that drives it (for example via Puppeteer or Browsershot), or on the command line:
chromium --headless --print-to-pdf=out.pdf https://example.com. - WeasyPrint: a Python tool with good CSS print support, packaged for Ubuntu/Debian (
apt install weasyprint) and installable with pip on AlmaLinux/Rocky:weasyprint page.html out.pdf. - Pure-PHP libraries such as Dompdf or mPDF (installed with Composer): no server software needed, so they work on shared hosting, with simpler CSS support.
If an application still needs wkhtmltopdf
Existing applications (for example older Odoo versions) may require it. Install the last release package (0.12.6) on a VPS, keep it away from untrusted HTML, and plan a move to one of the alternatives. On shared hosting, use a PHP library instead.