Skip to content
FossShelf
Home / Categories / For Engineers

Gotenberg

Docker-based API for PDF conversion

Replaces —

13.61K starsMITlast commit 14 Nov 2026
Screenshot of Gotenberg

Who it's for

SaaS invoice and report generation

A backend service renders invoice HTML templates with customer data and sends them to Gotenberg's Chromium endpoint to produce pixel-perfect PDFs. JavaScript-rendered totals and web fonts are preserved exactly as the browser would display them.

you need programmatic layout without an HTML/template step

Office document archival

A document management system sends uploaded .docx and .xlsx files to Gotenberg's LibreOffice endpoint and stores the resulting PDF/A-1b output for long-term archival compliance.

you only need HTML-to-PDF and have no office document formats

E-invoice generation

A finance platform uses Gotenberg to embed Factur-X or ZUGFeRD XML into PDFs, producing machine-readable e-invoices that meet European structured invoice standards.

you do not operate in a jurisdiction requiring structured e-invoices

Cloud-native document pipelines

A data pipeline stores source documents in S3 and uses Gotenberg's presigned URL support to convert them without routing files through an application server, with webhook callbacks signalling completion to downstream services.

your files are not in S3-compatible storage or your pipeline is simple enough for synchronous conversion

The problem

Generating PDFs programmatically requires managing complex dependencies: headless browsers for web-to-PDF, office suites for document conversion, and PDF manipulation libraries for merging or encrypting output. Keeping these tools installed, updated, and configured correctly across environments is brittle. Gotenberg solves this by bundling Chromium, LibreOffice, and PDF engines into a single Docker container with a unified HTTP API, so any language or stack can produce production-quality PDFs with a single curl command.

How it works

Pixel-perfect Chromium rendering

Headless Chromium converts URLs, HTML templates, and Markdown files into PDFs with full JavaScript execution, web font loading, and browser-accurate rendering. Supports waiting for network idle, JavaScript expressions, or specific DOM selectors before capture.

LibreOffice document conversion

Converts .docx, .xlsx, .pptx, and 100+ other legacy and standard formats to PDF. Supports extracting specific page ranges and outputting PDF/A-1b archival-compliant files in a single request.

PDF post-processing engines

Merge, split, rotate, flatten, watermark, stamp, encrypt, and inspect PDFs using QPDF, pdfcpu, and ExifTool through a unified API. Supports password protection with separate user and owner passwords and permissions.

Factur-X and ZUGFeRD e-invoices

Embed structured XML into PDFs to produce Factur-X and ZUGFeRD compliant e-invoices, and read or write PDF metadata and bookmarks using ExifTool.

Zero-transfer S3 pipelines

Gotenberg fetches input files directly from S3 presigned GET URLs and pushes output to S3 presigned PUT URLs, bypassing your application server. Webhook events deliver structured JSON notifications on completion or failure.

Network and header control

Inject custom cookies and HTTP headers, configure handling of network errors and specific status codes, and add Authorization headers for converting authenticated pages.

Features

  • Pixel-perfect Chromium rendering
  • LibreOffice document conversion
  • PDF post-processing engines
  • Factur-X and ZUGFeRD e-invoices
  • Zero-transfer S3 pipelines
  • Network and header control

How to install

docker run --rm -p "3000:3000" gotenberg/gotenberg:8

Recommended for this setup

Strengths

  • Single container, no dependency management: Chromium, LibreOffice, fonts, and PDF engines are all bundled inside the official Docker image. There is nothing to install or configure beyond running `docker run gotenberg/gotenberg:8`.
  • Language and framework agnostic: The API is plain HTTP multipart/form-data, so any language or stack that can make an HTTP request can use Gotenberg without a dedicated SDK or client library.
  • Multi-architecture support: Official images are published for amd64, arm64, armhf, i386, and ppc64le, covering most server and edge hardware configurations.
  • Bandwidth-efficient cloud storage integration: The S3 presigned URL pipeline lets Gotenberg fetch and return files directly from cloud storage, saving application server bandwidth and simplifying architectures where documents are already stored in S3, MinIO, or GCS.

Trade-offs

  • Container overhead is non-trivial: Bundling Chromium and LibreOffice produces a large Docker image. Teams with tight image size constraints or serverless environments that cold-start frequently may find the startup latency or image size impractical.
  • Stateless by design: Gotenberg is a stateless conversion service with no job queue, no dashboard, and no built-in persistence. Orchestrating high-volume async workloads requires an external queue or webhook-based workflow on top of it.
  • Not a PDF generation SDK: Gotenberg converts existing documents or renders web content to PDF; it does not provide a programmatic API for building PDF layouts from scratch. Teams that need precise programmatic layout control will still need a library like pdfme or WeasyPrint.

Tech stack

Languages
Go, Gherkin, Bru, Dockerfile, Makefile, Shell
Frameworks
—
Databases
—
Tooling
Docker, Chromium, Puppeteer

FAQ

What formats can Gotenberg convert to PDF?

Via Headless Chromium: URLs, HTML files, and Markdown files. Via LibreOffice: .docx, .xlsx, .pptx, and 100+ other office and legacy document formats. The README describes the full feature set.

How do I start Gotenberg?

Run `docker run --rm -p 3000:3000 gotenberg/gotenberg:8`. The API is then available at http://localhost:3000. No additional configuration is required to convert a URL or file.

Which architectures does the Docker image support?

Official images are published for amd64, arm64, armhf, i386, and ppc64le.

Can Gotenberg handle JavaScript-heavy single-page applications?

Yes. The Chromium endpoint supports waiting for network idle, a JavaScript expression to evaluate to true, or a specific DOM selector to appear before rendering, making it suitable for SPAs.

Is Gotenberg free to use commercially?

Yes. Gotenberg is released under the MIT license, which permits free commercial use.

Similar tools

More in Engineers