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, screenshots, and conversion of about 130 file types, including Word, Excel, and PowerPoint, without writing browser-management code. It also merges, splits, stamps, watermarks, and encrypts PDFs. 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 a finished document every time, and you run the container, its memory, and its upgrades. DocSpring stores HTML, Word, and page design templates and fills them from JSON, fills existing PDFs, and adds web forms and signature requests. 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, and signing without operating anything.
A converter, not a document service
Gotenberg exposes routes such as /forms/chromium/convert/html, /forms/chromium/screenshot/html, and /forms/libreoffice/convert. You POST files, and it returns a PDF or an image. Its PDF engine routes merge, split, flatten, rotate, stamp, watermark, and encrypt PDFs and convert them to PDF/A, and any route can fetch its inputs from URLs and 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 template, a Word document with Liquid tags, a page design from the visual Page Designer, or an uploaded PDF with fields, and send data rather than markup. DocSpring also renders HTML 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, and fill them from JSON, whether they are HTML, Word documents your team edits in Word, or page designs. You may also need to fill existing PDF forms, collect data or signatures, or save PDFs to S3, Google Drive, Dropbox, or Box. You would rather buy credits than run Chromium and LibreOffice in production.
Choose Gotenberg for self-hosted conversion, especially of Office files
You need spreadsheets, presentations, or finished Word files converted to PDF, your documents cannot leave your network, and you already have Docker and monitoring in place. Your application will keep owning the 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.
Scroll the table sideways to see both products.
| What you need | DocSpring | Gotenberg |
|---|---|---|
| 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. Gotenberg converts, merges, and flattens PDFs and stamps text, images, or pages from another PDF onto them, but does not fill fields from data. |
| 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, 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 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 sending it. |
| 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 is produced by your own code. |
| Word and PowerPoint templates | Conditions apply: Word only Upload a Word document (.docx) or OpenDocument file (.odt) with Liquid tags, and get a PDF, a Word document, an OpenDocument file, or more than one. No PowerPoint. | Conditions apply: Conversion only The LibreOffice route converts about 130 file types to PDF as they are, including DOCX, XLSX, and PPTX. Nothing fills in your data, so the document must be finished before you send it. |
| 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 No stored templates. Versioning is whatever your repository and deploys provide. |
| 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. | 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 signature request events. | Yes Posts the result to the URL you supply per request, or PUTs it to a presigned storage URL, and can report events to a second URL. Retries after connection errors, 429s, 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. |
| Images of the pages | Yes Add png to a submission's output formats to get an image of each page of its PDF. | Conditions apply: Screenshots Screenshot routes capture HTML, Markdown, or a URL as one PNG, JPEG, or WebP image of the browser's viewport, not an image of each page of a PDF. |
| 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 The software has no audit. Your platform and processes determine compliance. |
| 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 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. DocSpring adds a field for each value the tags use, so the API checks your JSON before rendering. Preview, and publish a version. If your team would rather edit the invoice in Word, upload it as a Word template with the same Liquid tags.
Send JSON to the API and receive a download URL, or generate asynchronously with a webhook. Ask for PNG images of the pages too if you need them. DocSpring can save each PDF to S3, Google Drive, Dropbox, or Box, and delete its own copy after the expiry you set.
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 yourself, or have Gotenberg upload it to a presigned S3 URL your application creates, 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 'files=@index.html' \
--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/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.
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 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 plansGotenberg
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. Hosting platforms such as Upsun and Elestio run Gotenberg instances for you.
A small container for a few hundred documents a month is cheap to run and expensive to own. On DocSpring, 300 HTML PDFs a month need a 5,000-credit pack on the free Developer plan, at $29, and the pack lasts several months. A Word document costs more than an HTML PDF: 300 a month from a Word template need the Starter plan with 10,000 credits, at $49. Weigh the on-call time and the missing template management against those prices.
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 DocSpring adds the template's fields from your tags.
Replace the multipart POST to Gotenberg with a JSON request to DocSpring. If you were filling .docx files with a templating library before converting them, upload the Word document as a DocSpring Word template and turn its placeholders into Liquid tags. Delete the container, or keep it only for converting files that aren't templates, such as spreadsheets and presentations.
If you were merging PDFs with Gotenberg, use DocSpring's combine PDFs API. If you were stamping values onto existing PDFs, upload them to DocSpring. It finds the fields, AI names them, and you check them in the editor.
Questions about Gotenberg and DocSpring
Ask us about your documentsDoes Gotenberg support templates or variables?
No. Gotenberg converts the HTML or document you send. Loops, conditions, and data validation live in your application. DocSpring stores the template with its Liquid logic, as HTML, a Word document, or a page design, and checks the JSON you send against its fields.
Can Gotenberg fill an existing PDF form?
No. It can merge, split, and flatten PDFs and stamp text, images, or PDF pages onto them, but it does not fill form fields from your data. DocSpring finds the fields on a PDF you upload, AI names them, and the API fills them from JSON.
Does DocSpring convert Word documents?
DocSpring fills Word templates, a .docx or .odt file with Liquid tags, and returns a PDF, a Word document, an OpenDocument file, or more than one. It is not a conversion API for any Office file. If you need spreadsheets or presentations converted, or 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
- Gotenberg documentation
- Gotenberg routes (Chromium, screenshots, LibreOffice, and PDF engines)
- Gotenberg HTML screenshot route
- Gotenberg LibreOffice route (accepted formats and form fields)
- Gotenberg stamp route
- Gotenberg webhooks and Download From
- Gotenberg on GitHub (MIT license)
- Gotenberg releases on GitHub
- Upsun's Gotenberg service
- Elestio's managed Gotenberg
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 Gotenberg.
Move your Gotenberg HTML into a DocSpring template
Upload a PDF or a Word document, design a page, or write HTML, then send a test request. No credit card needed.
