wkhtmltopdf alternative
The short version
- wkhtmltopdf is free, offline and still works for simple pages, but the GitHub repository has been archived (read-only) since 2023-01-02 and the last release, 0.12.6, shipped 2020-06-11.
- Its own maintainer's guidance is blunt: “Do not use wkhtmltopdf with any untrusted HTML,” because the embedded WebKit hasn't been patched since 2012 and a hostile payload “can lead to complete takeover of the server it is running on.”
- Pick Galley if you want a maintained render path and nobody has to run a browser; pick wkhtmltopdf if you need a free, offline, air-gapped binary and control every byte of the input yourself.
| Item | wkhtmltopdf | Galley Render |
|---|---|---|
| Cost to run | $0, LGPLv3, self-hosted — you supply the server | 5 PDF pages or 5 images a month, plus a keyless trial of 10 PDF pages or 10 images |
| Latest release | 0.12.6, 2020-06-11. A planned 0.12.7 was never published | Dated changelog; see /docs/changelog |
| Repository | Archived (read-only) on GitHub since 2023-01-02, 1,352 open issues at the time of archiving | Actively developed |
| Untrusted HTML | “Do not use wkhtmltopdf with any untrusted HTML” — the maintainer's own status page | Every asset a template fetches goes through an SSRF-safe policy on every render, on any input |
| Engine | QtWebKit: Qt 4 unsupported since 2015, the WebKit inside it unpatched since 2012 | Chromium via Playwright, kept current |
wkhtmltopdf has no price to compare — the real cost is the server, the sandboxing and the maintenance window you take on. See “What running Chromium yourself costs” in the migration guide linked below.
wkhtmltopdf isn’t a company, so this isn’t quite the comparison the rest of this section runs. It’s a command-line tool, LGPLv3, that renders HTML to PDF with an embedded copy of WebKit. It is also, by its own maintainer’s account, a project that stopped moving forward around 2016 and has been archived on GitHub since 2023-01-02. If you’re reading a “wkhtmltopdf alternative” page, you already know something is wrong with it — this page is about what, specifically, and what your options are.
What each one is
Section titled “What each one is”wkhtmltopdf is a static binary you run yourself: wkhtmltopdf input.html output.pdf, or the same through a language binding. It renders with QtWebKit, a fork of the WebKit engine that Qt shipped inside Qt 4 and briefly inside early Qt 5 builds. There’s no template store, no schema, no queue and no delivery — you generate a file on a machine you manage and do something with it yourself.
Galley Render takes a template name and a JSON payload and returns a signed URL to a PDF, PNG or JPG. Templates are HTML with a Liquid subset and a JSON Schema per version; versions are immutable; identical inputs hit a deterministic cache and cache hits are never billed. Rendering runs on current Chromium through Playwright — nobody has to install, patch or sandbox a browser to use it.
Where the project actually stands
Section titled “Where the project actually stands”Read in the maintainer’s own words, on the project’s own status page, checked 2026-09-24:
Do not use wkhtmltopdf with any untrusted HTML — be sure to sanitize any user-supplied HTML/JS, otherwise it can lead to complete takeover of the server it is running on!
Qt 4 (which wkhtmltopdf uses) hasn’t been supported since 2015, the WebKit in it hasn’t been updated since 2012.
There is no deadline by when the last two points will happen, or even that they will be done at all — it all depends on the time available to the maintainer and if volunteers step up to take up some tasks.
The maintainer’s own recommendation for the two cases most people reach for wkhtmltopdf: WeasyPrint or the commercial Prince for HTML you control, and Puppeteer (or a wrapper around it) if the source is a site with dynamic JavaScript.
The facts underneath that advice, sourced separately:
- Latest release: 0.12.6, 2020-06-11. A “final 0.12.7” was announced for August 2020 to close out known regressions; it never shipped, and 0.12.6 remains the newest binary on wkhtmltopdf.org’s downloads page as of 2026-09-24.
- The GitHub repository has been archived (read-only) since 2023-01-02. At the time of writing it carries 14,556 stars and 1,329 open issues and 23 open pull requests (checked 2026-09-24), none of which can be acted on inside the repository anymore.
- The dependency chain is frozen twice over. Qt 4 lost support in 2015; QtWebKit was deprecated by the Qt project in 2015 and removed from Qt entirely in 2016. The WebKit code inside it hasn’t been updated since 2012 — before flexbox, before most of CSS Grid, before any of the last decade of browser security work.
None of this means every existing wkhtmltopdf deployment is on fire today. It means the tool cannot be patched by its own project if something in that WebKit copy turns out to be exploitable, which is precisely the scenario its own status page warns about.
Pricing, or the lack of one
Section titled “Pricing, or the lack of one”wkhtmltopdf is free to download and run. What it isn’t free of is a server, a sandbox, and the person who maintains both — the same argument our guide on running Chromium yourself makes about Puppeteer applies here with an older, unpatched engine underneath it. If you’re weighing “keep the free binary” against “pay for a hosted render,” that’s the real trade, not a price-per-page one.
For what a hosted alternative costs:
| Plan | Price | Includes |
|---|---|---|
| Free | $0 | 5 PDF pages or 5 images a month, 3 templates, no watermark. Plus a keyless MCP trial of 10 PDF pages or 10 images |
| Solo | $5/mo | 200 PDF pages or 500 images a month, 10 templates, webhooks, cloud delivery, 30-day retention |
| Starter | $19/mo | 2,000 PDF pages or 5,000 images a month, 25 templates, webhooks, cloud delivery, 30-day retention |
| Growth | $79/mo | 12,000 PDF pages or 30,000 images a month, unlimited templates, cloud push, 90-day retention, priority queue |
| Scale | $249/mo | 60,000 PDF pages or 150,000 images a month, dedicated pool, SLA |
Feature comparison
Section titled “Feature comparison”Only rows we could source from wkhtmltopdf’s own site and GitHub page, checked 2026-09-24.
| wkhtmltopdf | Galley Render | |
|---|---|---|
| License / cost | Free, LGPLv3, self-hosted | Hosted service; free tier plus paid plans above |
| Engine | QtWebKit (WebKit, frozen since 2012) | Current Chromium via Playwright |
| Maintenance | Repository archived, read-only, since 2023-01-02 | Actively developed; see the changelog |
| JavaScript in the source page | Supported, with a wait flag, on a very old engine | Runs before capture, on current Chromium |
| Modern CSS (flexbox, grid) | Partial to absent — the underlying WebKit predates most of it | Full support: whatever the running Chromium supports |
| Untrusted input | Explicitly unsafe per the maintainer; “complete takeover” risk named on their own site | Every asset fetch — image, font, stylesheet — passes an SSRF-safe policy on every render |
| Schema for input data | None — you build and validate the HTML yourself | A JSON Schema per template version, with a free validate_data dry run |
| Template store, versioning | None — templates are files you manage | Versioned, immutable, addressable by name@version |
| Deterministic cache | None | SHA-256 of template version, data and options; a hit is free |
| Delivery | Writes a local file; hosting is your own job | Signed URL, expiring, on every render |
| Concurrency and pooling | Yours to build (see the migration guide below) | Managed pool, queued past a limit |
| MCP server / agent surface | None | Yes, at https://mcp.galleyrender.com/mcp |
Where wkhtmltopdf is the better choice
Section titled “Where wkhtmltopdf is the better choice”- The document has to stay offline, air-gapped, or inside a network with no egress. A hosted API is the wrong shape for that regardless of price. wkhtmltopdf, run inside a locked-down container with no network access and only your own trusted HTML, still does the one job it was built for.
- You cannot pay for anything, ever. LGPLv3 and a static binary means no bill, at the cost of everything in the feature table above.
- A very old, very simple layout is all you need, and you’ve already sanitized or fully control every byte of the input HTML.
Where Galley is the better choice
Section titled “Where Galley is the better choice”- The HTML comes from anywhere you don’t fully control — a customer’s name, an uploaded field, an admin panel. wkhtmltopdf’s own maintainer says not to do this. Galley’s asset fetcher applies the same SSRF-safe policy to every render, regardless of who wrote the template.
- You want an engine that gets patched. Chromium ships security updates on its own schedule; QtWebKit hasn’t shipped one since Qt removed it in 2016.
- Modern CSS matters to the document — flexbox, grid, current print rules. wkhtmltopdf’s WebKit predates most of it.
- You don’t want to own a render fleet. Pooling, health checks, zombie-process cleanup, font installation — the migration guide covers the same list for Puppeteer, and it applies here too, on top of an engine that’s older.
- An agent is the one doing the rendering. A schema per template, a keyless trial, and an MCP server with no binary to install.
Nothing above needs an account, a card or a key. The demo renders on the production service.
Migrating
Section titled “Migrating”wkhtmltopdf’s command-line flags map onto Galley’s options fairly directly. The one thing that doesn’t carry over is JavaScript-driven or login-gated pages — wkhtmltopdf executes page JS on a very old engine; Galley’s Chromium path does the same on a current one, so behaviour that depended on that old engine’s quirks may render differently.
| wkhtmltopdf flag | Galley options field |
|---|---|
--page-size Letter | "page_size": "Letter" |
-O landscape / --orientation Landscape | "landscape": true |
--margin-top 20mm (and -bottom, -left, -right) | "margin": "20mm", or per-side in the template’s own @page CSS |
--print-media-type | Default behaviour — Galley’s Chromium path always uses print styles for @page rules |
--disable-smart-shrinking / --zoom | "scale" |
--background (on by default) | "print_background": true |
--javascript-delay / --no-stop-slow-scripts | Not needed — the page’s own load and font-ready events are awaited before capture |
Move the HTML into a template once:
curl -sS https://api.galleyrender.com/v1/templates \ -H "Authorization: Bearer $GALLEY_API_KEY" \ -H 'content-type: application/json' \ -d '{ "name": "report", "engine": "chromium", "source": "<html><body><h1>{{ title }}</h1><p>{{ body }}</p></body></html>", "schema": { "type": "object", "required": ["title", "body"], "properties": { "title": { "type": "string" }, "body": { "type": "string" } } } }'Then render, in place of the CLI call:
# Before: wkhtmltopdf --page-size Letter --margin-top 20mm report.html report.pdf
curl -sS https://api.galleyrender.com/v1/render \ -H "Authorization: Bearer $GALLEY_API_KEY" \ -H 'content-type: application/json' \ -d '{ "template": "report@1", "format": "pdf", "data": { "title": "Q3 summary", "body": "Renders are up and to the right." }, "options": { "page_size": "Letter", "margin": "20mm", "print_background": true } }'{ "object": "render", "id": "rnd_7hq2m4x8k1bv", "status": "succeeded", "template": "report@1", "format": "pdf", "cached": false, "url": "https://<account>.r2.cloudflarestorage.com/galley-renders/renders/…?X-Amz-Expires=3600&X-Amz-Signature=…", "page_count": 1, "billable_units": 1}The quickstart has the MCP path, and the free HTML to PDF tool runs this without an account.
Where the competitor’s numbers came from
Section titled “Where the competitor’s numbers came from”Sources
Section titled “Sources”All accessed 2026-09-24.
- wkhtmltopdf project status, in the maintainer’s own words (history, summary and recommendations) — https://wkhtmltopdf.org/status.html
- wkhtmltopdf downloads page, latest release 0.12.6 dated 2020-06-11 — https://wkhtmltopdf.org/downloads.html
- wkhtmltopdf.org home page, licensing (LGPLv3) and current maintainer — https://wkhtmltopdf.org/
- GitHub repository, archived (read-only) 2023-01-02, star and open-issue counts — https://github.com/wkhtmltopdf/wkhtmltopdf
- Galley Render pricing — /pricing
Prices and project status change. wkhtmltopdf’s repository is archived, so its own numbers are unlikely to move; check https://wkhtmltopdf.org/status.html and our pricing page before deciding anything on these numbers.