---
type: Article
title: "wkhtmltopdf vs Gotenberg: When a PDF API makes sense | Marqius"
description: Try Marqius to keep your PDF call. Consider Gotenberg if several
  apps need a shared service for invoices, Word files or spreadsheets.
resource: https://marqius.com/blog/wkhtmltopdf-vs-gotenberg/
tags:
  - marqius
  - journal
status: stable
sources:
  - id: official-page
    resource: https://marqius.com/blog/wkhtmltopdf-vs-gotenberg/
    last_modified: 2026-11-20T07:33:00.355Z
generated:
  by: process:marqius-site-build
  at: 2026-11-20T10:13:23.582Z
x_marqius:
  language: en
  source_sha256: eea8bf4f16160e0a6eb7dd19a749dc6b7d0ffa2750d93dc12f1b4571b9114ba5
  extraction: public-main-content
---

wkhtmltopdf migration

# wkhtmltopdf vs Gotenberg: When a PDF API makes sense

Try Marqius to keep your PDF call. Consider Gotenberg if several apps need a shared service for invoices, Word files or spreadsheets.

Marqius November 20, 2026

A shop has one app that makes PDF invoices. A larger team has three apps sending documents, including Word files and spreadsheets. The shop may need to change one program. The larger team may want one place to send all kinds of files.

## Why this helps

**Marqius helps the first team keep its app working.** If the app already starts wkhtmltopdf, install Marqius beside it and change the program path in the app’s PDF library. Keep the existing templates, then compare one invoice before switching. [Find the setting for your library](https://marqius.com/blog/wkhtmltopdf-deprecated-alternatives/)

**Gotenberg helps the second team share one PDF service.** Apps send their files to it and get PDFs back. It uses Chromium for web pages and LibreOffice for Word or Excel files. Choose it when you want that shared service and have a team to run it. If your app currently starts wkhtmltopdf, the app will need to send a request to the service instead. [Gotenberg project](https://github.com/gotenberg/gotenberg) · [Conversion routes](https://gotenberg.dev/docs/8.x/getting-started/routes)

## How to choose

1.  **If you want to keep the existing PDF call,** try Marqius with the library you already use.
2.  **If you want one service for several apps,** try Gotenberg with a real file from each app.
3.  **Before moving your live jobs,** save the old PDFs and check that the new ones have the right content, layout and page count.

## Make the same invoice both ways

You need Docker and curl 7.71 or newer. Both commands render the same static invoice. The first calls Marqius like a command. The second sends the file to a test service.

### 1\. Set up the sample

Terminal

```
mkdir -p marqius-gotenberg-demo
cd marqius-gotenberg-demo
```

The studio’s **Invoice 1001** uses three Marqius products as line items so you can see how they fit together. **Marqius wkhtmltopdf** keeps your existing PDF call working, **Studio** is where you design the document, and **Relay** generates it from a template and data. The sample amounts add up to **120.00 EUR** including VAT. Open `START-HERE.html` after unzipping to run the invoice and check a page break. [Download the print demo (ZIP)](https://marqius.com/download/wkhtmltopdf-demo/0.12.8/marqius-invoice-demo.zip) · [Open the invoice PDF](https://marqius.com/download/wkhtmltopdf-demo/0.12.8/expected-invoice.pdf)

If your team also checks files before they go to press, use the sample from Marqius Engine. It has a finished A4 size, 3 mm of bleed, real CMYK colour patches and a 100 mm reference you can measure at actual size. [Open the press test sheet](https://marqius.com/download/wkhtmltopdf-demo/0.12.8/marqius-press-proof.pdf)

Unzip the demo and put `invoice.html` in your test folder. If you're already in the terminal, you can get the same file with one command.

Terminal

```
curl -fsSLo invoice.html https://marqius.com/download/wkhtmltopdf-demo/0.12.8/invoice.html.txt
```

### 2\. Make the PDF with Marqius

Terminal

```
docker run --rm --network none --mount "type=bind,source=$PWD,target=/data" \
  marqius/wkhtmltopdf:0.12.8 --page-size A4 invoice.html invoice-marqius.pdf
```

### 3\. Start the Gotenberg test service

Terminal

```
service_id=$(docker run -d --rm -p 127.0.0.1:3100:3000 gotenberg/gotenberg:8-chromium)
curl -fsS --retry 15 --retry-all-errors --retry-delay 1 --max-time 5 http://127.0.0.1:3100/health
```

The service listens on your computer only. This smaller image is enough for HTML. Use the full Gotenberg image to test Word or spreadsheet conversion.

### 4\. Send the invoice and get the PDF back

Terminal

```
cp invoice.html index.html
curl -fsS --max-time 60 --form 'files=@index.html' --form 'preferCssPageSize=true' \
  http://127.0.0.1:3100/forms/chromium/convert/html -o invoice-gotenberg.pdf
ls -lh invoice-marqius.pdf invoice-gotenberg.pdf
docker stop "$service_id"
```

Gotenberg expects **index.html** as the main file. If your real document has a local stylesheet, add another form part for that file and keep the name used by your HTML. [Gotenberg HTML route](https://gotenberg.dev/docs/chromium/convert-html)

Open both PDFs. Check the heading, the **120.00 EUR** total and where the table sits on the page. Think about which change your app needs. To try Marqius, change the program path in your existing PDF library. To use Gotenberg, add an HTTP request and handle the response or error. The [public scoreboard](https://github.com/marqiushq/wkhtmltopdf-parity#the-scoreboard) covers the separate comparison of wkhtmltopdf and Marqius.

## Reader questions

### Can Gotenberg be installed as the wkhtmltopdf executable?

Gotenberg exposes HTTP endpoints. To switch an app that calls wkhtmltopdf, change the integration to submit an HTTP request and handle a PDF response.

## Keep reading

[wkhtmltopdf is unmaintained: Your options in 2026](https://marqius.com/blog/wkhtmltopdf-deprecated-alternatives/) [Install wkhtmltopdf on Debian 12 or 13: Bookworm and Trixie](https://marqius.com/blog/install-wkhtmltopdf-debian/) [wkhtmltopdf vs headless Chromium: What changes when you switch](https://marqius.com/blog/wkhtmltopdf-vs-headless-chromium/) [All journal guides](https://marqius.com/blog/)

Source for this page [^official-page].

[^official-page]: https://marqius.com/blog/wkhtmltopdf-vs-gotenberg/

[Browse this section](index.md) · [Knowledge index](../index.md)
