Deprecated since January 2023

The best wkhtmltopdf alternative for modern HTML to PDF

Replace deprecated wkhtmltopdf with a modern Chromium-based HTML to PDF API. Full CSS3, JavaScript support, form filling, batch processing, and zero security vulnerabilities. One API call, no binaries to install, no Docker to maintain.

wkhtmltopdf is deprecated and insecure

The GitHub repository was archived in January 2023. No new releases, security patches, or bug fixes are planned. Here's why you need a modern wkhtmltopdf replacement.

Unpatched security vulnerabilities

CVE-2022-35583 (CVSS 9.8) allows SSRF attacks via iframe injection. CVE-2020-21365 enables directory traversal. The maintainer warns: "Do not use wkhtmltopdf with any untrusted HTML".

No modern CSS support

Flexbox, Grid, custom properties, calc(), and transforms are not supported. Bootstrap 4+ grid classes break completely due to the outdated WebKit engine frozen in 2012.

JavaScript limited to ES5.1

No arrow functions, Promises, async/await, or fetch(). Modern frameworks like React, Vue, and Angular may not render correctly without transpiling to ES5 via Babel.

Memory leaks and instability

Verified memory leak of 20-60KB per call. Not thread-safe — concurrent requests can cause PDF cross-contamination. Processes hang indefinitely with no built-in timeout.

The modern wkhtmltopdf replacement

wkhtmltopdf is deprecated and insecure. DocuQueue is the modern HTML to PDF alternative with a Chromium engine, full CSS3 support, and zero infrastructure to manage.

No Docker required

Sign up, get a key, make an API call. That's it.

Scales to 10K+ PDFs

No capacity planning. Auto-scales behind the scenes.

Real support

Not a GitHub issue that goes unanswered for months.

URL-to-PDF built in

Convert live URLs to PDF with one parameter.

Async processing

Built-in job queue. No Redis or Bull setup needed.

Batch processing

Generate hundreds of PDFs from a single CSV upload.

Custom DOCX templates

Upload your own Word documents as templates. Fill them with data via the API. No HTML or CSS required.

PDF form filling

Detect and fill form fields in existing PDFs. wkhtmltopdf has zero form filling support.

Template engine

Upload DOCX templates, fill with JSON data, get PDFs. Design templates in Word, not code.

wkhtmltopdf vs DocuQueue
Feature wkhtmltopdf DocuQueue
Status Deprecated (Jan 2023) Active development
Rendering Engine Qt WebKit (frozen 2012) Chromium (modern)
CSS Flexbox & Grid Not supported Full support
JavaScript ES5.1 only Full modern JS
Security 2 unpatched CVEs No known vulnerabilities
Installation Binary + Qt libraries REST API (no install)
Concurrency Not thread-safe Fully concurrent
URL-to-PDF Basic (broken CSS) Full Chromium rendering
Template Support None DOCX templates + JSON fill
Form Filling Not supported Auto-detect & fill fields
Batch Processing Manual scripting only CSV upload, auto-generate
Async Processing None (blocks process) Built-in job queue
Pricing Free (LGPL) Free plan (25 credits/mo) + paid plans
Replace wkhtmltopdf with one API call

Whether you use Python with pdfkit or Node.js with puppeteer, switching to DocuQueue is straightforward. Here's how to migrate your HTML to PDF code.

python-pdfkit (requires wkhtmltopdf)
import pdfkit

# Requires wkhtmltopdf binary on system
html = "<h1>Invoice #1042</h1>"

options = {
    'page-size': 'A4',
    'margin-top': '20mm',
    'margin-bottom': '20mm',
}

pdfkit.from_string(
    html, 
    'invoice.pdf', 
    options=options
)
DocuQueue Python (no binary needed)
import requests

html_content = "<h1>Invoice #1042</h1>"

response = requests.post(
    "https://docuqueue.com/api/v1/convert-html",
    headers={"api-key": "YOUR_KEY"},
    json={
        "html": html_content,
        "format": "A4",
        "margin": {
            "top": "20mm",
            "bottom": "20mm"
        }
    }
)

# Save PDF
open("invoice.pdf", "wb").write(response.content)
DocuQueue Node.js (no puppeteer needed)
const response = await fetch(
  "https://docuqueue.com/api/v1/convert-html",
  {
    method: "POST",
    headers: {
      "api-key": "YOUR_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      html: "<h1>Invoice #1042</h1>",
      format: "A4",
      margin: { top: "20mm", bottom: "20mm" },
    }),
  }
);

// Save PDF
const buffer = await response.arrayBuffer();
fs.writeFileSync("invoice.pdf",
  Buffer.from(buffer));
When to choose which

Keep wkhtmltopdf if...

  • Need a completely offline solution with no internet
  • Have a working integration where current rendering is sufficient
  • Need built-in Table of Contents generation
  • Don't require modern CSS or JavaScript

Choose DocuQueue if...

  • Need modern CSS — Flexbox, Grid, CSS variables
  • Need JavaScript execution for charts or dynamic content
  • Want a simple REST API with no binaries to install
  • Need reliable PDF generation at scale
  • Require GDPR-compliant processing
Frequently asked questions

Common questions about migrating from wkhtmltopdf to a modern HTML to PDF API.

Is wkhtmltopdf deprecated?
Yes. The wkhtmltopdf GitHub repository was archived in January 2023. No new releases, security patches, or bug fixes are planned. The maintainer explicitly warns against using it with untrusted HTML due to unpatched CVEs (CVE-2022-35583, CVE-2020-21365). DocuQueue is a modern wkhtmltopdf replacement that uses a maintained Chromium engine.
What is the best modern replacement for wkhtmltopdf?
DocuQueue is a modern HTML to PDF API that replaces wkhtmltopdf with a Chromium-based engine. It supports full CSS3 (Flexbox, Grid), modern JavaScript (ES2020+), form filling, URL-to-PDF conversion, batch processing, and DOCX templates. A free plan with 50 credits per month is available at docuqueue.com/register.
How do I migrate from wkhtmltopdf to DocuQueue?
Migration takes four steps: (1) Sign up for a free account, (2) Replace your wkhtmltopdf command-line calls or pdfkit code with a single REST API POST request, (3) Pass your HTML or URL in the request body with formatting options (page size, margins), (4) Remove the wkhtmltopdf binary from your server. The entire migration typically takes 15-30 minutes. See the code examples above for Python and Node.js.
Does DocuQueue support PDF form filling?
Yes. DocuQueue supports PDF form filling natively. You can detect form fields in existing PDFs, fill them with data via the API, and return the completed PDF. wkhtmltopdf has no built-in form filling capability. See our PDF form filling guide for details.
What security vulnerabilities does wkhtmltopdf have?
wkhtmltopdf has multiple unpatched CVEs. CVE-2022-35583 (CVSS 9.8) allows SSRF attacks via iframe injection. CVE-2020-21365 enables directory traversal. Since the project is archived, these will never be patched. DocuQueue runs on a maintained Chromium engine with no known vulnerabilities and all data encrypted at rest and in transit.
Can I convert a URL to PDF with DocuQueue?
Yes. DocuQueue has built-in URL-to-PDF conversion. Send a URL directly and receive a PDF of the rendered page, with full support for JavaScript-rendered content, SPAs, and modern CSS. wkhtmltopdf also supports URLs but uses a frozen 2012 WebKit engine that cannot handle modern web pages correctly.
How does DocuQueue pricing compare to wkhtmltopdf?
wkhtmltopdf is free and open source (LGPL), but requires server infrastructure, DevOps time, and carries security risk from unpatched CVEs. DocuQueue offers a free plan with 25 credits per month, with paid plans starting at $9/month. The total cost of ownership is often lower with DocuQueue because you eliminate server maintenance, Docker setup, and security patching overhead.
Does DocuQueue support DOCX templates?
Yes. DocuQueue supports DOCX template-based PDF generation. Upload a Word document template, then fill it with data via the API to generate a PDF. This lets non-technical users design templates in Microsoft Word or Google Docs without writing HTML or CSS. wkhtmltopdf has no template support.
Can DocuQueue handle batch PDF generation?
Yes. DocuQueue supports batch processing where you can generate hundreds of PDFs from a single CSV upload. wkhtmltopdf has no batch processing capability and requires writing custom shell scripts or Python wrappers to generate multiple PDFs sequentially, often hitting memory leaks and stability issues.
Is DocuQueue compatible with wkhtmltopdf CSS?
DocuQueue uses a modern Chromium engine, so CSS written for wkhtmltopdf's frozen 2012 WebKit engine may need minor adjustments. However, DocuQueue supports all modern CSS features (Flexbox, Grid, custom properties, calc()) that wkhtmltopdf cannot handle. Most HTML/CSS works as-is, and the upgrade in rendering quality is significant. Check our API documentation for formatting options.
4 steps to replace wkhtmltopdf

A step-by-step guide to migrate your wkhtmltopdf integration to DocuQueue's modern HTML to PDF API.

1

Sign up

Create a free account and get your API key from the dashboard.

2

Replace code

Swap wkhtmltopdf calls for a single REST API POST request.

3

Test output

Verify formatting matches your requirements with modern CSS rendering.

4

Remove binaries

Delete wkhtmltopdf and Docker from your server. Done.

See how DocuQueue compares

vs Gotenberg

Self-hosted Chromium PDF engine. DocuQueue gives you the same quality without Docker or infrastructure.

vs Puppeteer

Headless Chrome library for PDF generation. DocuQueue wraps it in a managed API with templates and batch processing.

vs DocRaptor

HTML-to-PDF API at $49/mo. DocuQueue offers more features including URL conversion, templates, and form filling at a lower price.

PDF Form Filling

Fill PDF form fields programmatically. Auto-detect fields, fill with JSON data, and return completed PDFs.

Start generating PDFs in 2 minutes

50 free credits. No credit card required.

Try Free →