Skip to content

wkhtmltopdf alternative

The short version

  1. 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.
  2. 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.”
  3. 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.
At a glance
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.

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.

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.

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:

PlanPriceIncludes
Free$05 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/mo200 PDF pages or 500 images a month, 10 templates, webhooks, cloud delivery, 30-day retention
Starter$19/mo2,000 PDF pages or 5,000 images a month, 25 templates, webhooks, cloud delivery, 30-day retention
Growth$79/mo12,000 PDF pages or 30,000 images a month, unlimited templates, cloud push, 90-day retention, priority queue
Scale$249/mo60,000 PDF pages or 150,000 images a month, dedicated pool, SLA

Only rows we could source from wkhtmltopdf’s own site and GitHub page, checked 2026-09-24.

wkhtmltopdfGalley Render
License / costFree, LGPLv3, self-hostedHosted service; free tier plus paid plans above
EngineQtWebKit (WebKit, frozen since 2012)Current Chromium via Playwright
MaintenanceRepository archived, read-only, since 2023-01-02Actively developed; see the changelog
JavaScript in the source pageSupported, with a wait flag, on a very old engineRuns before capture, on current Chromium
Modern CSS (flexbox, grid)Partial to absent — the underlying WebKit predates most of itFull support: whatever the running Chromium supports
Untrusted inputExplicitly unsafe per the maintainer; “complete takeover” risk named on their own siteEvery asset fetch — image, font, stylesheet — passes an SSRF-safe policy on every render
Schema for input dataNone — you build and validate the HTML yourselfA JSON Schema per template version, with a free validate_data dry run
Template store, versioningNone — templates are files you manageVersioned, immutable, addressable by name@version
Deterministic cacheNoneSHA-256 of template version, data and options; a hit is free
DeliveryWrites a local file; hosting is your own jobSigned URL, expiring, on every render
Concurrency and poolingYours to build (see the migration guide below)Managed pool, queued past a limit
MCP server / agent surfaceNoneYes, at https://mcp.galleyrender.com/mcp
  1. 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.
  2. You cannot pay for anything, ever. LGPLv3 and a static binary means no bill, at the cost of everything in the feature table above.
  3. A very old, very simple layout is all you need, and you’ve already sanitized or fully control every byte of the input HTML.
  1. 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.
  2. 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.
  3. Modern CSS matters to the document — flexbox, grid, current print rules. wkhtmltopdf’s WebKit predates most of it.
  4. 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.
  5. 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.

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 flagGalley 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-typeDefault 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-scriptsNot needed — the page’s own load and font-ready events are awaited before capture

Move the HTML into a template once:

Terminal window
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:

Terminal window
# 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”

All accessed 2026-09-24.

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.