Skip to content
marqiushqPublic

About

Install wkhtmltopdf's maintained replacement with apt, dnf or apk: signed repositories for marqius-wkhtmltopdf on Debian 13, Ubuntu 26.04, Rocky Linux, Red Hat, Fedora, Amazon Linux and Alpine, x86-64 and ARM64.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

Install wkhtmltopdf on Debian 13, Ubuntu 26.04, Rocky, Fedora and Alpine: marqius-wkhtmltopdf

What it is. Signed apt, dnf and apk repositories for marqius-wkhtmltopdf, the maintained drop-in replacement for wkhtmltopdf. Install it with your system's own package manager and keep it up to date with the rest of the system.

Why it matters. Debian 13 and Ubuntu 26.04 no longer include wkhtmltopdf, so apt install wkhtmltopdf answers "Unable to locate package" there, and wkhtmltopdf's own project was archived in 2023. These repositories give you a program that takes the same command and the same options, on Debian, Ubuntu, Rocky Linux, Red Hat Enterprise Linux, Fedora, Amazon Linux and Alpine, on x86-64 and ARM64.

It is installed as marqius-wkhtmltopdf, so a wkhtmltopdf you already have keeps working until you choose to switch.

Debian and Ubuntu

Add the repository, once:

sudo curl -fsSLo /etc/apt/sources.list.d/marqius.sources https://packages.marqius.com/apt/marqius.sources

Install it (run this line again at any time to update it):

sudo apt update && sudo apt install marqius-wkhtmltopdf

Rocky Linux, Red Hat Enterprise Linux, Fedora and Amazon Linux

Add the repository, once:

sudo curl -fsSLo /etc/yum.repos.d/marqius.repo https://packages.marqius.com/rpm/marqius.repo

Install it. The first time, dnf asks you to accept the signing key: check that its fingerprint matches the one under Check what you install.

sudo dnf install marqius-wkhtmltopdf

Alpine

As root, add the repository and its key, then install:

wget -qP /etc/apk/keys https://packages.marqius.com/alpine/marqius.rsa.pub
echo https://packages.marqius.com/alpine >> /etc/apk/repositories
apk add marqius-wkhtmltopdf

In a Dockerfile

On Debian and Ubuntu images, such as python:3.13, ruby:3.4 and php:8.4:

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
ADD https://packages.marqius.com/apt/marqius.sources /etc/apt/sources.list.d/
RUN apt-get update && apt-get install -y --no-install-recommends marqius-wkhtmltopdf

On Rocky Linux, Red Hat UBI, Fedora and Amazon Linux images:

ADD https://packages.marqius.com/rpm/marqius.repo /etc/yum.repos.d/
RUN dnf install -y marqius-wkhtmltopdf

On Alpine images:

ADD https://packages.marqius.com/alpine/marqius.rsa.pub /etc/apk/keys/
RUN echo https://packages.marqius.com/alpine >> /etc/apk/repositories && apk add --no-cache marqius-wkhtmltopdf

Check it works

It reads wkhtmltopdf's command line as it is. Try it in an empty folder:

marqius-wkhtmltopdf --version
echo '<h1>Invoice 42</h1><p>Total €1,234.50</p>' > invoice.html
marqius-wkhtmltopdf --page-size A4 invoice.html invoice.pdf

The fonts it needs come with it: the Liberation and DejaVu families, the same as in the marqius/wkhtmltopdf Docker images. (Red Hat's UBI images do not offer Liberation; there it comes with DejaVu alone.)

Switch your application

Keep your library, HTML templates and PDF calls, and point the library at marqius-wkhtmltopdf in either of two ways.

Name its path in the library's settings: /usr/bin/marqius-wkhtmltopdf. marqius-wkhtmltopdf help libraries lists the libraries it knows, from python-pdfkit and Snappy to wicked_pdf and Rotativa, and marqius-wkhtmltopdf help snappy (or another name from that list) shows where each one takes the path.

Or give it the names wkhtmltopdf and wkhtmltoimage, in /usr/local/bin, where libraries look first:

sudo marqius-wkhtmltopdf install

Programs that run wkhtmltopdf now run marqius-wkhtmltopdf, and wkhtmltopdf -V says so. A wkhtmltopdf already in /usr/local/bin is left as it is; sudo marqius-wkhtmltopdf install --force takes its place and keeps it beside it. To take the names away again, and put back what --force kept:

sudo marqius-wkhtmltopdf install --undo

On Alpine, as root, run the same lines without sudo.

Or let apt install it as wkhtmltopdf, for programs whose installer asks apt for the package wkhtmltopdf, or that run /usr/bin/wkhtmltopdf or /usr/bin/wkhtmltoimage. On Debian 13 and Ubuntu 26.04, which have no wkhtmltopdf of their own, this installs marqius-wkhtmltopdf-names, which puts both names in /usr/bin:

sudo apt update && sudo apt install wkhtmltopdf

Where the system has a wkhtmltopdf of its own (Debian 12, Ubuntu 22.04 and 24.04), apt keeps installing that one. sudo apt remove marqius-wkhtmltopdf-names takes the names away again.

Marqius PDF to EPUB

The same repositories also serve Marqius PDF to EPUB, a preview: it turns the PDFs books were printed from back into reflowable EPUB 3, HTML or Markdown, with chapters, notes and the printed page numbers kept. Once the repository is set up as above, install it on Debian and Ubuntu:

sudo apt update && sudo apt install marqius-pdftoepub

On Rocky Linux, Red Hat Enterprise Linux, Fedora and Amazon Linux:

sudo dnf install marqius-pdftoepub

On Alpine, as root:

apk add marqius-pdftoepub

It runs as pdftoepub, and pdftoepub --version shows the version installed. It updates with the rest of the system; sudo apt remove marqius-pdftoepub (or sudo dnf remove, apk del) removes it. Its licence.

Updates

Every new release of marqius-wkhtmltopdf reaches these repositories within the hour, after it has been installed and tested on every system listed under Tested on every release. Every earlier release stays in them, so a version you have pinned keeps installing. It updates with the rest of the system, or on its own:

sudo apt update && sudo apt install marqius-wkhtmltopdf
sudo dnf upgrade --refresh marqius-wkhtmltopdf
apk upgrade --update-cache marqius-wkhtmltopdf

Check what you install

Every package, and every repository index, is signed. apt, dnf and apk check the signatures before they install anything.

  • apt and dnf key: marqius.asc, fingerprint D42A F470 6C33 20A8 5512 F721 2408 F335 9788 FAB6.
  • Alpine key: marqius.rsa.pub, whose SHA-256 is cfb6f52cbf20f6f9067157cc9e8d864ec42680eca920eb288aa6e4f595aba73f.

Each release on the releases page lists every file of it in one SHA256SUMS: the four downloads on marqius.com and the eight packages. The file is signed in two ways. Download it and its signatures:

curl -fsSLO https://github.com/marqiushq/packages/releases/latest/download/SHA256SUMS
curl -fsSLO https://github.com/marqiushq/packages/releases/latest/download/SHA256SUMS.asc
curl -fsSLO https://github.com/marqiushq/packages/releases/latest/download/SHA256SUMS.sigstore.json

Check it with cosign. The signature was made by this repository's release workflow and is recorded in Sigstore's public log:

cosign verify-blob SHA256SUMS --bundle SHA256SUMS.sigstore.json --certificate-identity https://github.com/marqiushq/packages/.github/workflows/packages.yml@refs/heads/main --certificate-oidc-issuer https://token.actions.githubusercontent.com

Or with gpg, against the key above:

curl -fsSL https://packages.marqius.com/marqius.asc | gpg --import
gpg --verify SHA256SUMS.asc SHA256SUMS

Each package, and SHA256SUMS, also carries GitHub's record of how it was made: the workflow run and the exact commit of this repository that built it. Check it with GitHub's command line, signed in:

gh attestation verify SHA256SUMS --repo marqiushq/packages

Then, in the folder with your downloads, sha256sum --ignore-missing -c SHA256SUMS checks each of them.

Remove it

Removing it also takes away the names wkhtmltopdf and wkhtmltoimage that marqius-wkhtmltopdf install gave it in /usr/local/bin, and puts back a program they had replaced.

sudo apt remove marqius-wkhtmltopdf && sudo rm /etc/apt/sources.list.d/marqius.sources
sudo dnf remove marqius-wkhtmltopdf && sudo rm /etc/yum.repos.d/marqius.repo
apk del marqius-wkhtmltopdf && sed -i '\|packages.marqius.com|d' /etc/apk/repositories && rm /etc/apk/keys/marqius.rsa.pub

Tested on every release

Debian 12 and 13, Ubuntu 22.04, 24.04 and 26.04, Rocky Linux 9 and 10, Red Hat Enterprise Linux 9 (UBI), Fedora, Amazon Linux 2023, and Alpine 3.22, 3.23 and 3.24, each on x86-64 and ARM64. Before a release reaches the repositories, the workflow checks each download against its published checksum, then installs it on each of these systems with the lines on this page, exactly as printed, and makes a PDF.

Questions

Is this the same program as on marqius.com, Homebrew and Docker Hub? Yes. Each package holds the release published on marqius.com, checked against its published checksum before it is packaged, with the fonts it needs.

Why is it called marqius-wkhtmltopdf and not wkhtmltopdf? So that installing it never changes a program you already have. When you are ready, sudo marqius-wkhtmltopdf install gives it the names wkhtmltopdf and wkhtmltoimage, and --undo takes them away again.

Do I need an X server or Xvfb? No. It needs nothing else installed.

Can I use it in Docker? Yes: the Dockerfile lines above install it in Debian, Ubuntu, Red Hat and Alpine images. Ready-made images are on Docker Hub as marqius/wkhtmltopdf.

Licence

marqius-wkhtmltopdf is commercial software from Simple AI LLC, with a 30-day free trial counted from its first run; marqius-wkhtmltopdf licence shows the days left. After the trial, without a licence, each page carries one line, “Prepared by Marqius, Purchase Licence”. Plans and licences · Licence terms

Questions: hello@marqius.com. The same program is also available with Homebrew, as the Docker image marqius/wkhtmltopdf, and with the one-line installer on marqius.com.

About

Install wkhtmltopdf's maintained replacement with apt, dnf or apk: signed repositories for marqius-wkhtmltopdf on Debian 13, Ubuntu 26.04, Rocky Linux, Red Hat, Fedora, Amazon Linux and Alpine, x86-64 and ARM64.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages