wkhtmltopdf Alternative
Move on from wkhtmltopdf
wkhtmltopdf was the standard HTML-to-PDF tool for a decade. It's now abandoned, stuck on a CSS 2.1 engine, and breaks on modern Linux distributions. Here's what to use instead.
Why wkhtmltopdf fails on modern layouts
wkhtmltopdf uses a patched version of Qt WebKit — the browser engine Apple abandoned in 2012 in favour of Blink. Its CSS support is frozen at roughly the 2013 level: no flexbox, no CSS grid, no CSS custom properties, no @font-face from CDNs, no modern layout primitives at all. Any template using Tailwind v3+, Bootstrap 5, or any component library built in the last five years will produce broken or unrecognisable output.
The project's last release (0.12.6) was in June 2020, and the maintainers archived the GitHub repository in January 2023 — it's now read-only, with no new issues, pull requests, or releases possible. It also requires compiling Qt WebKit from source on newer Linux distributions, which frequently fails.
| Feature | wkhtmltopdf | Renderfy |
|---|---|---|
| CSS support | CSS 2.1 + limited CSS 3 | Full CSS (Chromium) |
| Flexbox / Grid | Not supported | Fully supported |
| CSS variables | Not supported | Fully supported |
| Custom fonts | System fonts only / fragile | Webfonts + system fonts |
| Active maintenance | Abandoned (last release 2020) | Yes |
| Tailwind CSS | Partial / broken | Full support |
| Serverless friendly | Requires binary on host | Yes — plain HTTP |
| Multi-page support | Yes | Yes (natural browser page breaks) |
| Output formats | PDF, PNG, SVG | PDF, PNG, JPEG, WebP |
| Custom brand fonts | System fonts only / fragile | Google Fonts by family name — per request |
| Saved templates | No | Yes — POST { template, data } with placeholder substitution |
| Batch rendering | No (one call per doc) | Up to 20 per request |
| Data residency | Wherever you host | EU — server in Germany, DB in Ireland |
| Input types | HTML / URL | HTML, Tailwind, Markdown, code, charts, diagrams, math |
Migrating from wkhtmltopdf
If you have existing HTML templates designed for wkhtmltopdf, they'll almost certainly render better with a Chromium-based engine — the CSS support gap was in wkhtmltopdf's favour in zero cases. The migration path is straightforward:
- Replace your wkhtmltopdf call with an HTTP POST to the Renderfy render endpoint.
- Pass your existing HTML as the
contentfield withtype: "html". - Optionally modernise the template to use Tailwind — it'll render correctly now that you have a real CSS engine.
Side-by-side: generating a PDF
wkhtmltopdf
import { exec } from 'child_process';
exec(
`wkhtmltopdf - output.pdf`,
(err) => { ... }
);
// Requires binary on host
// No flexbox, no grid
// Abandoned since 2020Renderfy
const res = await fetch(
'https://renderfy.io/api/v1/render',
{
method: 'POST',
headers: {
'Authorization': 'Bearer KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
type: 'html',
content: yourHtml,
options: { format: 'pdf',
dimensions: 'a4' },
}),
}
);
// Full CSS, no binary, serverlessFull CSS support, no binary to manage
100 free credits. First render in under 5 minutes.
Get started free