HTML To PDF Converter
3 March 2026

wkhtmltopdf Is Dead. Here Are the Best Alternatives in 2026.

wkhtmltopdf was archived in January 2023 with no security updates, no modern CSS, and no future. If you're still using it, here's how to migrate to something that actually works.

wkhtmltopdf was archived in January 2023. The GitHub repository is read-only. There are no security patches, no bug fixes, and no plans to resume development. If your production system depends on wkhtmltopdf, you are running unpatched software with known vulnerabilities.

This isn't a scare tactic — it's just the reality. The project served the community well for over a decade, but its time has passed. Here's what to use instead.

Why wkhtmltopdf can't keep up

  • Archived: No commits since 2023. No maintainers. No security patches.
  • QtWebKit engine: Based on a fork of WebKit that predates modern CSS. No flexbox. No grid. No CSS custom properties.
  • No modern JavaScript: ES6+ features (arrow functions, async/await, template literals) are unsupported or broken.
  • System dependencies: Requires X11/Xvfb on headless Linux, specific font packages, and platform-specific binaries that are increasingly hard to source.
  • Security: The embedded WebKit engine has known vulnerabilities that will never be patched.

If your HTML templates use any modern CSS or JavaScript, wkhtmltopdf is already producing broken output. If they don't today, they will as soon as a developer updates the templates.

The alternatives

1. HTML to PDF API (easiest migration)

Replace wkhtmltopdf with an HTTP call. Send HTML, get a PDF URL back. No binaries to install, no system dependencies, no rendering engine to maintain.

# Before (wkhtmltopdf)
wkhtmltopdf invoice.html invoice.pdf

# After (API call)
curl -X POST https://htmltopdfconverter.com.au/api/programmatic/pdf/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: text/html" \
  --data-binary @invoice.html

htmltopdfconverter.com.au charges $5 AUD/year for unlimited API access. Other options include PDFShift ($9/mo) and DocRaptor ($15/mo).

2. Puppeteer / Playwright (self-hosted)

If you need to keep rendering on your own infrastructure, Puppeteer (or Playwright) gives you a real Chromium instance with full modern CSS and JavaScript support. This is the closest equivalent to wkhtmltopdf's "run a binary locally" model.

npm install puppeteer

// generate-pdf.js
const puppeteer = require('puppeteer');
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setContent(html, { waitUntil: 'networkidle0' });
await page.pdf({ path: 'invoice.pdf', format: 'A4', printBackground: true });
await browser.close();

Trade-off: Chromium is 170–400 MB, uses significant memory, and requires careful management in production (process pooling, leak prevention, sandbox configuration).

3. WeasyPrint (Python)

If you're in a Python ecosystem, WeasyPrint is a CSS-based PDF renderer that doesn't need a browser. It supports a good subset of CSS (including flexbox since v57) and produces clean PDF output.

Trade-off: Requires cairo, Pango, and GDK-PixBuf system libraries. Docker setup can be tricky. CSS support is good but not Chromium-level.

4. Typst (for structured documents)

If you're generating reports or academic documents and are open to a new markup language, Typst is a modern typesetting system that compiles to PDF. It's not HTML-based, but it's fast, has excellent typography, and is worth considering for new projects.

Migration checklist

  1. Audit your templates: Do they use modern CSS (flexbox, grid, custom properties)? If so, wkhtmltopdf is already rendering them incorrectly.
  2. Pick a replacement: API for simplicity, Puppeteer for self-hosted control, WeasyPrint for Python-only stacks.
  3. Test with real data: Run your worst-case templates (longest invoices, widest tables, most complex layouts) through the new renderer.
  4. Check CSS differences: wkhtmltopdf's QtWebKit handles some CSS edge cases differently from Chromium. Test margins, page breaks, and table rendering.
  5. Update your CI/CD: Remove wkhtmltopdf binary installation steps from your Dockerfiles and build scripts.

The fastest migration path

If you want to migrate with the least effort, an API is the simplest replacement. You remove the wkhtmltopdf binary from your system and replace the shell command with an HTTP request.

Sign up, grab an API key from your dashboard, and test your templates against our Chromium renderer. API docs here.

FAQ

Is wkhtmltopdf really dead?

Yes. The GitHub repository was archived in January 2023. The last release was 0.12.6 in January 2020. There are no plans to resume development.

Will my wkhtmltopdf templates work with Chromium?

Mostly, but test them. wkhtmltopdf's QtWebKit engine handles some CSS differently from Chromium, especially around margins, page breaks, and table layout. Modern CSS features that didn't work in wkhtmltopdf will render correctly in Chromium.

What about Snappy (PHP) and PDFKit (Ruby)?

Both are wrappers around wkhtmltopdf. If the underlying binary is dead, the wrapper is dead too. Replace them with an API call or a Puppeteer-based solution.

Can I drop in an API call where I currently call wkhtmltopdf?

Yes. If your current workflow is "render HTML → pass to wkhtmltopdf → get PDF file," replace the middle step with an HTTP POST. The HTML goes in, a PDF URL comes back. The rest of your code stays the same.