DocSpring vs Gotenberg

Compare running Gotenberg in Docker with sending JSON to DocSpring.

Our take

Gotenberg is the best of the self-hosted options. It packages Chromium and LibreOffice behind a clean HTTP API in one Docker image, so you get modern HTML rendering plus Word and PowerPoint conversion without writing browser-management code. It is MIT licensed and actively maintained.

What it does not do is manage documents. There are no stored templates, no template language, no data validation, and no PDF form filling. You send finished HTML every time and you run the container, its memory, and its upgrades. Choose Gotenberg if you need Office conversion on your own infrastructure or your policy forbids sending documents to a vendor. Choose DocSpring if you want templates, versioning, form filling, forms, and signatures without operating anything.

A converter, not a document service

Gotenberg exposes routes such as /forms/chromium/convert/html and /forms/libreoffice/convert. You POST files, it returns a PDF. It also merges PDFs, converts to PDF/A, and can call a webhook when an asynchronous conversion finishes. That is a well-designed surface for a conversion engine.

DocSpring is built around templates. You store an HTML/CSS and Liquid template or an uploaded PDF with fields, define a JSON schema, and send data rather than markup. DocSpring also renders with Chromium, so the same HTML renders similarly once you set the font, background, and page margins that DocSpring's default styles and normalize.css would otherwise supply. The difference is where the template lives and who operates the renderer.

Choose DocSpring for templates, form filling, and no servers

You want to keep layouts out of your application code, version them, validate the data, fill existing PDF forms visually, and optionally collect data or signatures. You would rather pay per month than run Chromium in production.

Choose Gotenberg for self-hosted conversion, especially of Office files

You need DOCX or PPTX to PDF, your documents cannot leave your network, and you already have Docker and monitoring in place. Your application will keep owning the HTML templating.

Feature comparison

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

Available Not available Limited or your responsibility

Scroll the table sideways to see both products.

Gotenberg and DocSpring: rendering, templates, API behavior, and operations
What you need DocSpring Gotenberg
Templates
Fill an existing PDF Yes Overlay fields on your PDF. Import existing form fields or place your own. No No form filling. Gotenberg converts, merges, and stamps text or images onto pages, but does not fill fields from data.
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, or Office documents converted as they are.
HTML to PDF Yes HTML/CSS and Liquid templates, with code editors and a PDF preview. Yes: Chromium Chromium routes convert HTML, Markdown, or a URL with headers, footers, and page options.
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 sending it.
Conditional content Yes Show or require PDF fields with conditional rules. Use Liquid conditions for HTML content. Conditions apply: Your template engine Conditional content is produced by your own code.
Word and PowerPoint templates No Upload a PDF exported from your document, or recreate a dynamic layout in HTML/CSS. Native DOCX and PPTX merging is not supported. Yes LibreOffice routes convert DOCX, XLSX, PPTX, and other Office formats to PDF. Merge fields are not filled.
Template versioning Yes Edit drafts, publish numbered versions, and pin API requests to a version. Conditions apply: Your responsibility No stored templates. Versioning is whatever your repository and deploys provide.
Editable PDF output Yes Keep text and checkbox fields editable, or flatten the filled content. Conditions apply: Office input only Chromium output has no form fields. The LibreOffice route exports form fields from Office documents by default.
API integration
Synchronous generation Yes Use sync.api.docspring.com to receive submission JSON and a PDF download URL in one request. Yes Routes return the PDF in the response by default.
Asynchronous generation Yes Send wait=false to return immediately. Receive a webhook or check the submission status later. Yes Send a Gotenberg-Webhook-Url header and the request returns immediately while the conversion runs.
Webhooks Yes Receive notifications about PDF generation and Data Request events. Yes Posts the result, or an error, to the URL you supply per request, retrying after connection errors and most 5xx responses. Delivery logs are up to you.
Batch PDF generation Yes Generate up to 50 PDFs in a request with different templates and data. Conditions apply: Your responsibility Chromium routes convert one document per request. LibreOffice and PDF engine routes accept several files and return a ZIP. Concurrency is bounded by the container's capacity.
Combine PDFs Yes Combine generated PDFs and other PDF files into one document. Yes The PDF engines route merges several PDFs into one.
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 The software has no audit. Your platform and processes determine compliance.
HIPAA compliance Yes HIPAA compliant. Sign a BAA before submitting protected health information; contact [email protected]. Conditions apply: Your responsibility Documents stay inside your network, which narrows scope. The controls remain yours.
Automatic document deletion Yes Set an expiry per template for submission data, generated PDFs, and uploaded images. Conditions apply: Your responsibility Gotenberg is stateless. Retention is whatever your storage does with the output.
US and EU hosting Yes Choose the US or EU service region. Conditions apply: Your responsibility Runs wherever you deploy the container.
Self-hosting Yes: Enterprise Self-hosted enterprise licenses are available. Yes Self-hosted only. MIT license, official Docker images.

"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.

The same invoice through Docker and through an API

Suppose your application has a customer name and a list of line items. Both approaches produce a PDF from HTML rendered by Chromium. Compare who renders the template and who runs the browser.

In DocSpring

Create an HTML template, paste in your markup and CSS, and use a Liquid loop for the items. Define the fields in the schema, preview, and publish a version.

Send JSON to the API and receive a download URL, or generate asynchronously with a webhook. Add S3 delivery and an expiry if you want DocSpring to handle storage and cleanup.

In Gotenberg

Render the HTML with your own template engine and write it to index.html. POST it to the Chromium route with paper size and margin fields. Gotenberg returns the PDF.

Run the container with enough memory for Chromium and LibreOffice, put it behind your load balancer, and monitor it. Store the output and implement retention in your own code.

Convert the invoice with Gotenberg

Gotenberg's API is straightforward. The HTML still has to be produced by your application before the call.

set -e

# Gotenberg runs as a Docker container on your infrastructure.
docker run --rm --detach --name gotenberg-comparison \
  -p 127.0.0.1:3000:3000 gotenberg/gotenberg:8

# Stop the example container when the script exits, even if a step fails.
trap 'docker stop gotenberg-comparison > /dev/null' EXIT

# Wait for the service to start before sending a document.
curl --fail --silent --show-error --retry 10 --retry-all-errors \
  --retry-delay 1 --retry-max-time 30 'http://localhost:3000/health' > /dev/null

# Send finished HTML (rendered by your own template engine) to the Chromium route.
curl --fail-with-body \
  --request POST 'http://localhost:3000/forms/chromium/convert/html' \
  --form '[email protected]' \
  --form 'paperWidth=8.27' \
  --form 'paperHeight=11.7' \
  --output invoice.pdf

Generate the invoice with DocSpring

The same invoice as a Liquid template stored in DocSpring. Send the data, not the markup.

<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.

Test a burst of 50 conversions at once against a single container, and check memory use during a LibreOffice conversion. Capacity planning is the part of self-hosting that surprises people.

Free software plus a container you own

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

Gotenberg

Gotenberg is MIT licensed. The costs are the compute for a container that runs Chromium and LibreOffice, typically one or two GB of memory per instance, plus load balancing, monitoring, upgrades, and the templating and storage code in your application.

Gotenberg does not offer an official hosted service. Some third-party hosting providers run managed Gotenberg instances.

A small container for a few hundred documents a month is cheap to run and expensive to own. Weigh the on-call time and the missing template management against a fixed monthly plan.

Moving from Gotenberg to DocSpring

Your HTML and CSS move over largely unchanged, because both render with Chromium. DocSpring adds normalize.css and default styles for the font, background, and page margins, so set them explicitly and compare the output. Replace the templating in your application with Liquid in a DocSpring template, and move the data contract into the template schema.

Replace the multipart POST to Gotenberg with a JSON request to DocSpring. Delete the container, or keep it only for Office conversion if you still need DOCX to PDF, which DocSpring does not do.

If you were merging PDFs with Gotenberg, use DocSpring's combine PDFs API. If you were stamping values onto existing PDFs elsewhere, upload them to DocSpring and place fields visually.

Discuss your documents with us.

Questions about Gotenberg and DocSpring

Does Gotenberg support templates or variables?

No. Gotenberg converts the HTML you send. Loops, conditions, and data validation live in your application. DocSpring stores the template with Liquid logic and validates the JSON you send against a schema.

Can Gotenberg fill an existing PDF form?

No. It can merge PDFs, convert documents, and stamp text or images onto pages, but it does not fill form fields from your data. DocSpring's editor lets you place fields on any PDF and fill them from JSON.

Does DocSpring convert Word documents?

No. DocSpring fills PDFs and renders HTML/CSS templates. If you need DOCX to PDF conversion on your own infrastructure, Gotenberg's LibreOffice route is a good fit for that step.

About this comparison

We reviewed DocSpring's documentation and implementation alongside Gotenberg'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.

Move your Gotenberg HTML into a DocSpring template

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

Start Free Trial