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, and its own status page warns against running it on untrusted HTML.
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 HTML templates with current Chromium, stores and versions them, checks the data against their fields, and also fills existing PDF forms. If you'd rather stop maintaining HTML for your PDFs, its Page Designer lays documents out visually. 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, or people outside engineering who should be able to change a layout in a visual designer.
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 on HTML you control, 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.
Scroll the table sideways to see both products.
| What you need | DocSpring | wkhtmltopdf |
|---|---|---|
| Templates | ||
| Fill an existing PDF | Yes Overlay fields on your PDF. Import its form fields, let AI find and name them, or place your own. | No No form filling. It converts HTML only. |
| Visual document design | Yes Build a PDF on a blank page in the Page Designer, with text, images, tables, charts, QR codes, barcodes, fillable form fields, headers and footers. An AI assistant can build one too, through the MCP server. | 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 Tables and repeating sections in page designs, and Liquid loops in HTML and Word templates, carry on over as many pages as they need. Fields on an uploaded PDF can address array items. | 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 in page designs, HTML and Word templates. | Conditions apply: Your template engine Conditional content comes from your own template code. |
| Template versioning | Yes Edit drafts, see what changed since the last version, publish numbered versions, and pin API requests to one. | Conditions apply: Your responsibility Templates live in your repository. Versioning is whatever your deploy process provides. |
| Editable PDF output | Yes Keep a PDF template's text and checkbox fields editable, or flatten the filled content. Page designs can add fillable text fields, checkboxes, radio buttons and drop-downs. | 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 signature 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 template editor on any paid plan, from Starter, for PDF, Word, page design and HTML templates, and choose which controls your users can access. | No No editor exists. |
| Collect data with forms | Yes Every template gets a web form you can share or embed, and a PDF template can also be filled in on the page. | No Does not collect data. |
| Electronic signatures | Yes Signature requests support ESIGN/UETA signing workflows on every plan, live once your account has made a payment. Signers sign in order or all at once. | 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, with a BAA on every paid plan, including Starter. Sign it before sending health records. | 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. Put any header and footer HTML in the template's header and footer. Preview the PDF in the editor and publish a version.
Send JSON to the API and receive a download URL, or use webhooks for background jobs. DocSpring can also save each PDF to S3, Google Drive, Dropbox, or Box.
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/v2/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 free Developer plan includes 200 credits a month. Paid plans start with Starter at $49 a month for 10,000 credits. A filled PDF form costs 20 credits (9.8¢ on Starter), a PDF from an HTML template or a page design 4, a Word document 20, and each person who signs a signature request 60; longer documents cost more, and keeping documents for more than 30 days uses a few storage credits a month. Larger plans lower the price to 0.9¢ per filled PDF form, unused paid-plan credits roll over for 12 months, and credit packs top up any plan. Every plan includes e-signatures, every paid plan includes the embedded template editor and a HIPAA BAA, and you can try a paid plan's features free for 14 days without a card.
See all DocSpring planswkhtmltopdf
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. For comparison, 1,000 one-page invoices a month from a DocSpring HTML template need a 5,000-credit pack on the free Developer plan, at $29.
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. Set fonts, margins, and page size explicitly, and replace your template engine's loops with Liquid.
Move any header and footer HTML into the template's header and footer, where the pageNumber and totalPages classes print page numbers. Then replace the shell-out with an API call from your existing language. DocSpring has official client libraries for Ruby, Python, PHP, C#, and other languages, or use plain HTTP. Where a shell script or a cron job runs wkhtmltopdf, the DocSpring CLI takes its place. Its submit command fills in the template and saves the PDF. Delete the binary from your container image.
If you also stamp values onto existing PDFs with another tool, upload those PDFs to DocSpring. It finds the fields, even on scanned forms, and AI names them for you to check.
Questions about wkhtmltopdf and DocSpring
Ask us about your documentsIs 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?
Usually, and with fewer workarounds. DocSpring renders with headless Chromium, so CSS that needed workarounds in QtWebKit generally renders as it does in your browser. Set fonts, margins, and page size explicitly, review page-break rules, and move header and footer HTML into the template's own header and footer.
Can wkhtmltopdf fill PDF forms?
No. It only converts HTML to a new PDF. DocSpring fills existing PDFs. It finds the fields when you upload one, AI names them, and you adjust them in the editor.
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
- wkhtmltopdf project site
- wkhtmltopdf downloads (static builds and system dependencies)
- wkhtmltopdf status page (QtWebKit deprecation, untrusted HTML warning)
- wkhtmltopdf on GitHub (archived repository, LGPL 3.0 license)
- wkhtmltopdf releases on GitHub (0.12.6, June 2020)
Spotted something that needs correcting? Send us the detail and a source.
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.
Related comparisons
Other products people compare with wkhtmltopdf.
Try your wkhtmltopdf HTML in DocSpring
Upload a PDF or a Word document, design a page, or write HTML, then send a test request. No credit card needed.
