---
type: WebPage
title: "wkhtmltopdf in Docker: add a compatible program | Marqius"
description: Install Marqius in your own Linux image with the fonts your
  documents need. Keep the PDF command, compare output, and retain the old image
  for rollback.
resource: https://marqius.com/wkhtmltopdf/docker/
tags:
  - marqius
  - products-and-guides
status: stable
sources:
  - id: official-page
    resource: https://marqius.com/wkhtmltopdf/docker/
generated:
  by: process:marqius-site-build
  at: 2026-11-20T10:17:10.036Z
x_marqius:
  language: en
  source_sha256: c4122aa69f80c8f749d3c4c37a4a3c3c401b009c479c4189a0f780106e66dbbf
  extraction: public-main-content
---

DOCKER · KUBERNETES · CI

# Replace wkhtmltopdf  
_in your image._

Copy the compatible Linux program into your own image and keep your application command. Install the fonts that your document expects.

Install fonts Add Marqius Check a PDF

[Start your 30-day trial](https://marqius.com/app/sign-in/?plan=trial) [Download switching manual](https://marqius.com/download/replace-wkhtmltopdf.pdf)

Dockerfile

```
FROM ubuntu:22.04

# Install fonts your PDFs use
RUN apt-get update && \
  apt-get install -y curl ca-certificates \
  fonts-liberation2 fonts-dejavu-core

# Add the compatible program
RUN curl -fsSL https://marqius.com/marqius-wkhtmltopdf.sh | bash
```

New PDF

1

### Install fonts

A minimal container needs fonts. Add those used by your templates.

```
RUN apt-get install -y fonts-liberation2 fonts-dejavu-core
```

2

### Add Marqius

Use the verified installer in the image you already operate.

```
curl -fsSL https://marqius.com/marqius-wkhtmltopdf.sh | bash
```

3

### Check a PDF

Render and compare an actual document in the same image before rollout.

```
marqius wkhtmltopdf invoice.html new.pdf
marqius compare old.pdf new.pdf
```

**Build in your own image** Match your production fonts Keep the previous image tag for rollback

**Switching manual**

Examples and troubleshooting for Docker and related stacks.

[Download the manual (PDF)](https://marqius.com/download/replace-wkhtmltopdf.pdf)[Developer manual (PDF)](https://marqius.com/download/developer-manual.pdf)[Getting started guide (PDF)](https://marqius.com/download/getting-started.pdf)[14 integration examples on GitHub](https://github.com/marqius-wkhtmltopdf/marqius-wkhtmltopdf-examples)

[Start your 30-day trial](https://marqius.com/app/sign-in/?plan=trial)

PRACTICAL DETAILS

## What to check before you switch.

### Before changing the base image

Install at least one font in a minimal image, then add the same fonts used by your templates. Run an actual invoice, statement or report through both versions, compare the PDFs and keep the previous image tag for rollback.

### Need a service instead?

Marqius can also be run as a PDF service. Package and operate it inside your own container and security boundary; review the Engine documentation for that separate deployment.

Marqius is proprietary software from Simple AI LLC. It is independent of the wkhtmltopdf project. Other product names identify the tools discussed in these guides.

QUESTIONS & ANSWERS

## Docker questions

### Is there an official public Marqius Docker image?

Use the verified Linux download inside your own image today. This site will link an official image if one is published.

### Why must I install fonts in a container?

Minimal images may have no fonts at all. Add at least one font and the exact families your templates use, or conversion and text wrapping may fail.

### Can I keep the old image for rollback?

Yes. Retain the previous image tag until PDFs from the new image pass your review.

### Does a static executable mean no other configuration is needed?

It removes the old Qt and X11 dependency, but your templates may still need fonts, images, network access or browser JavaScript. Test those resources in the final image.

Source for this page [^official-page].

[^official-page]: https://marqius.com/wkhtmltopdf/docker/

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