From f0b2cd10ec8c7bf4fb1902f8a850fbadfc4f51d3 Mon Sep 17 00:00:00 2001 From: Marqius | wkhtmltopdf replacement Date: Tue, 24 Nov 2026 18:21:59 +0530 Subject: [PATCH] Document a maintained binary for python-pdfkit --- README.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.rst b/README.rst index 2822f0c..8ba8fb6 100644 --- a/README.rst +++ b/README.rst @@ -17,6 +17,37 @@ Deprecation Warning This library has been deprecated to match the `wkhtmltopdf project status `_. +A maintained binary +~~~~~~~~~~~~~~~~~~~ + +This library needs the ``wkhtmltopdf`` program, which is archived: its last +Linux build is for Ubuntu 22.04, and it does not install on Ubuntu 26.04, +Debian 13 or Alpine. On GitHub's ``ubuntu-latest`` runner, ``apt-get install wkhtmltopdf`` +fails with ``E: Package 'wkhtmltopdf' has no installation candidate``. + +``marqius-wkhtmltopdf`` is a maintained drop-in replacement — the same command +and options — built from scratch on the foundation of that command line, not +a fork of the archived code: one statically linked file, no Qt, no X server. +Installed with pip; the wheel carries the program for your platform, Windows +included: + +.. code-block:: bash + + pip install marqius-wkhtmltopdf + +pdfkit takes its path in one line: + +.. code-block:: python + + import pdfkit, marqius_wkhtmltopdf + config = pdfkit.configuration(wkhtmltopdf=marqius_wkhtmltopdf.path()) + +In slim images, install one font package first: +``apt-get install -y --no-install-recommends fonts-dejavu-core``. + +The Community licence is free for personal and open-source projects; +businesses need a commercial licence. + Installation ------------