DocSpring vs wkhtmltopdf

Compare a legacy command-line converter with a maintained, Chromium-based API.

Our take

wkhtmltopdf was the default answer to HTML to PDF for a decade, and a lot of production systems still shell out to it. It is now unmaintained. Its last release was in 2020, and it renders with a QtWebKit engine that predates flexbox and grid, so modern CSS either needs workarounds or does not work. Its bundled engine also no longer receives security fixes.

If you have a working wkhtmltopdf pipeline with simple layouts, there is no emergency. If you are starting something new, do not build on it. DocSpring renders with current Chromium, stores and versions your templates, validates the data, and also fills existing PDF forms. If you only want a self-hosted replacement, Gotenberg or Puppeteer are the maintained options.

Why wkhtmltopdf is still around

wkhtmltopdf is a command-line tool that converts HTML to PDF using QtWebKit. Its builds link Qt statically, which made it easy to drop into Rails, Django, PHP, and .NET projects through wrapper libraries such as wicked_pdf, pdfkit, and snappy. Many of those integrations are still running.

wkhtmltopdf is no longer maintained. Its GitHub repository was archived in January 2023, the last release was 0.12.6 in June 2020, and the QtWebKit engine it depends on was removed from Qt in 2016. Layouts that rely on flexbox, CSS grid, modern fonts, or newer JavaScript often render incorrectly, and teams end up maintaining a second, simplified stylesheet just for PDF output.

Choose DocSpring to replace a wkhtmltopdf pipeline properly

You want current browser rendering, one stylesheet for web and PDF, hosted template management, and a supported API. You may also have PDF forms that wkhtmltopdf could never fill.

Keep wkhtmltopdf for a stable legacy workflow you are not changing

Your layouts are simple, the output is correct today, the binary runs in a locked-down environment, and you accept that nobody will fix the next rendering or security problem.

Feature comparison

Follow the feature links for details in DocSpring's documentation. Sources for each wkhtmltopdf cell are listed at the end of the page.

Available Not available Limited or your responsibility

Scroll the table sideways to see both products.

wkhtmltopdf and DocSpring: rendering, templates, API behavior, and operations
What you need DocSpring wkhtmltopdf
Templates
Fill an existing PDF Yes Overlay fields on your PDF. Import existing form fields or place your own. No No form filling. It converts HTML only.
Visual document design No Use an existing PDF or write HTML/CSS. The field editor does not design the document layout. No No editor. Layouts are HTML and CSS in your codebase.
HTML to PDF Yes HTML/CSS and Liquid templates, with code editors and a PDF preview. Yes: QtWebKit Converts HTML with a QtWebKit engine. Limited or no support for flexbox, grid, and many newer CSS features.
Repeat a list of items Yes Liquid loops create growing tables in HTML templates. Fields on an uploaded PDF can address array items without changing the page layout. Conditions apply: Your template engine No templating. Your application renders the HTML before conversion.
Conditional content Yes Show or require PDF fields with conditional rules. Use Liquid conditions for HTML content. Conditions apply: Your template engine Conditional content comes from your own template code.
Template versioning Yes Edit drafts, publish numbered versions, and pin API requests to a version. Conditions apply: Your responsibility Templates live in your repository. Versioning is whatever your deploy process provides.
Editable PDF output Yes Keep text and checkbox fields editable, or flatten the filled content. No Output contains no form fields.
API integration
Synchronous generation Yes Use sync.api.docspring.com to receive submission JSON and a PDF download URL in one request. Yes Runs as a process and writes the PDF when it exits.
Asynchronous generation Yes Send wait=false to return immediately. Receive a webhook or check the submission status later. Conditions apply: Your responsibility Background conversion means your own queue and process management.
Webhooks Yes Receive notifications about PDF generation and Data Request events. No There is nothing to notify. Completion is your process exit code.
Batch PDF generation Yes Generate up to 50 PDFs in a request with different templates and data. Conditions apply: Your responsibility Run the binary once per document. Several inputs in one run produce a single combined PDF.
Combine PDFs Yes Combine generated PDFs and other PDF files into one document. No Multiple input pages can be combined in one run, but merging existing PDFs needs another tool.
Forms and e-signatures
Embed the template editor Yes Embed the PDF field editor and choose which controls your users can access. No No editor exists.
Collect data with forms Yes Generate web forms from your PDF template fields, or let people fill in the PDF visually. No Does not collect data.
Electronic signatures Yes Data Requests support ESIGN/UETA signing workflows. Your app supplies authentication details and sends notifications. No No signing workflow.
Security and deployment
SOC 2 Type II Yes Completed audit. Request the report through our Trust Portal. Conditions apply: Your responsibility No audit for the tool itself. Note that its rendering engine no longer receives security patches.
HIPAA compliance Yes HIPAA compliant. Sign a BAA before submitting protected health information; contact [email protected]. Conditions apply: Your responsibility Documents stay on your servers; the controls are yours to prove.
Automatic document deletion Yes Set an expiry per template for submission data, generated PDFs, and uploaded images. Conditions apply: Your responsibility Files go wherever your code writes them.
US and EU hosting Yes Choose the US or EU service region. Conditions apply: Your responsibility Runs wherever you install it.
Self-hosting Yes: Enterprise Self-hosted enterprise licenses are available. Yes Self-hosted only. LGPL 3.0 license.

"Limited or your responsibility" marks things the library only partly covers or leaves to your own code and infrastructure. Plan requirements and product boundaries are noted in the cells.

One invoice, one stylesheet

The same customer and line items rendered from HTML. The difference is which browser engine renders it and whether you can use the CSS you write for the web.

In DocSpring

Paste your HTML and CSS into an HTML template, including flexbox and grid layouts, and use Liquid for the line items. Preview the PDF in the editor and publish a version.

Send JSON to the API and receive a download URL, or use webhooks and S3 delivery for background jobs.

In wkhtmltopdf

Render the HTML with your application's template engine, write it to disk or a pipe, and run the binary with page-size and margin flags. Expect to maintain print-specific CSS that avoids modern layout features.

Wrap the process with timeouts and error handling, and store the output yourself.

Convert the invoice with wkhtmltopdf

The command itself is simple. The work is in the HTML that has to render correctly in a 2012 browser engine.

# Render the HTML with your own template engine first, then convert it.
wkhtmltopdf \
  --page-size A4 \
  --enable-local-file-access \
  --disable-smart-shrinking \
  invoice.html invoice.pdf

Generate the invoice with DocSpring

The same invoice as a Liquid template stored in DocSpring, rendered with current Chromium.

<h1>Invoice for {{ customer_name | escape }}</h1>
<table>
  <tr><th>Description</th><th>Amount (USD)</th></tr>
  {% for item in items %}
    <tr>
      <td>{{ item.description | escape }}</td>
      <td>{{ item.amount | currency }}</td>
    </tr>
  {% endfor %}
</table>
curl --fail-with-body \
  "https://sync.api.docspring.com/api/v1/templates/${DOCSPRING_TEMPLATE_ID}/submissions" \
  --user "${DOCSPRING_TEST_TOKEN_ID}:${DOCSPRING_TEST_TOKEN_SECRET}" \
  --header 'Content-Type: application/json' \
  --data '{
    "test": true,
    "data": {
      "customer_name": "Mira Patel",
      "items": [
        { "description": "Annual inspection", "amount": 120 },
        { "description": "Replacement filter", "amount": 35 }
      ]
    }
  }'

Set the environment variables to your template ID and test API credentials. Accounts in our EU region send requests to sync.api-eu.docspring.com instead. The response includes a download URL for a watermarked PDF. See the request and response guide.

Render your existing invoice in a current browser and compare it with the wkhtmltopdf output. The differences you find are the workarounds you have been maintaining.

Free, with a maintenance bill that has already come due

DocSpring

The Starter plan is $49 per month for 50 live PDFs, then 25c per additional PDF. Larger plans lower the per-PDF price. Every plan includes unlimited templates, users, and watermarked test PDFs, and there is a free trial with no card required.

See all DocSpring plans

wkhtmltopdf

wkhtmltopdf is free software. Its cost is the print-only CSS you maintain, the rendering bugs nobody will fix, and the security exposure of running an unpatched browser engine against HTML that may include user content.

Migrating away is usually a small project because the input is HTML you already have.

Count the hours your team has spent on "why does this look different in the PDF" in the last year. That is the price you are paying for a free tool, before any security review.

Moving from wkhtmltopdf to DocSpring

Take the HTML your wrapper library produces and paste it into a DocSpring HTML template. Remove the wkhtmltopdf-specific CSS workarounds, because DocSpring renders with headless Chromium and supports modern CSS. Replace your template engine's loops with Liquid.

Replace the shell-out with an API call from your existing language. DocSpring has official client libraries, or use plain HTTP. Delete the binary from your container image.

If you also stamp values onto existing PDFs with another tool, upload those PDFs to DocSpring and place the fields visually.

Discuss your documents with us.

Questions about wkhtmltopdf and DocSpring

Is wkhtmltopdf still maintained?

No. wkhtmltopdf is no longer maintained. Its GitHub repository was archived in January 2023, and the last release was version 0.12.6 in June 2020. Wrapper libraries such as wicked_pdf and pdfkit still work but cannot fix problems in the underlying engine.

Will my wkhtmltopdf HTML work in DocSpring?

Yes, and usually better. DocSpring renders with headless Chromium, so CSS that needed workarounds in QtWebKit generally renders as it does in your browser. Review page-break rules and any wkhtmltopdf-specific header and footer options.

Can wkhtmltopdf fill PDF forms?

No. It only converts HTML to a new PDF. DocSpring fills existing PDFs and lets you place the fields visually.

About this comparison

We reviewed DocSpring's documentation and implementation alongside wkhtmltopdf's published product, API, pricing, and security information. Prices and plan limits were checked on the review date shown at the top of the page. The workflows describe documented behavior; they are not performance benchmarks. Features and plans can change after the review date.

Sources

Spotted something that needs correcting? Send us the detail and a source.

Related comparisons

Product names, logos, and brands are the property of their respective owners and are used here for identification and comparison only. Their use does not imply any affiliation with or endorsement by those companies.

Try your wkhtmltopdf HTML in DocSpring

Upload a PDF or create an HTML template, then send a test request.

Start Free Trial