wkhtmltopdf migration

Is h4cc/wkhtmltopdf-amd64 abandoned? What PHP developers can install instead

If your PHP project installs PDFs with Composer, the binary probably comes from h4cc/wkhtmltopdf-amd64. Its GitHub repository last received a push in May 2024. Packagist has no official abandonment flag on this package. Its binaries are the archived program's, from before current systems existed. Here is what is happening, and the one-line replacement.

Marqius

Two illustrated invoice proofs aligned with a brass rule on a green desk

Package activity on 24 November 2026

  • 27,459,050 total downloads — the standard way PHP projects got the wkhtmltopdf binary for years.
  • 486,051 downloads in Packagist’s monthly count — still being installed, every day.
  • Last push to the repository: May 2024. The issue asking to mark it abandoned on Packagist has been open since November, and nobody maintains the package to answer it.

Read on 24 November 2026, from Packagist and GitHub.

Why the binary itself is the problem

The package ships the wkhtmltopdf program from the archived project. Check the binary inside your installed package. Its library requirements can differ from the last upstream release. On newer systems:

  • Ubuntu 24.04 and 26.04, Debian 12 and 13, Alpine 3.19 and later: the needed system libraries are gone. Depending on the binary, one failure is error while loading shared libraries: libssl.so.1.1: cannot open shared object file.
  • Heroku-22 apps that bundle it stop the same way, and Heroku-22 itself ends on 30 April 2027.
  • There is no arm64 build for the places PHP now runs — AWS Graviton, Apple Silicon.

The package cannot fix this. The program it packages is archived. Updating the Composer dependency alone leaves the bundled renderer unchanged.

The replacement, one line

bash
composer require marqius/wkhtmltopdf

marqius-wkhtmltopdf is a maintained drop-in replacement for wkhtmltopdf — the same command and options — built from scratch, not a fork of the archived code: one statically linked file, no Qt, no X server, no libssl.so.1.1. It runs on Ubuntu 26.04, Debian 13, Alpine, and ARM64, and the composer package brings the binary for your platform.

Snappy, laravel-snappy, phpwkhtmltopdf, KnpSnappyBundle and CakePdf keep working: each needs one line to point at the new binary, and the program's own help prints it — marqius-wkhtmltopdf help snappy. The step-by-step for each library: the PHP and Laravel guide.

On a server you can also install it once for everything, from the signed apt repository, and run marqius-wkhtmltopdf install so the name wkhtmltopdf keeps working for any tool that looks for it.

In Docker

Slim images need fonts first — one line, and the binary tells you which when it is missing:

dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends fonts-liberation2 fonts-dejavu-core

Check your PDFs after the switch

Make one PDF with the old binary and one with the new, then compare:

bash
marqius-wkhtmltopdf compare old.pdf new.pdf

Sources

Reader questions

Is h4cc/wkhtmltopdf-amd64 unmaintained?

Its repository was last pushed in May 2024, and the issue asking Packagist to mark it abandoned has no answer from the maintainer. Its binaries come from a program archived in January 2023.

Does marqius-wkhtmltopdf work with Snappy and CakePdf?

Yes. Their own test suites run against it, in public. See the library test results in Sources.

What about the i386 package?

h4cc/wkhtmltopdf-i386 is in the same state, for 32-bit servers. The replacement covers x86-64 and ARM64, which is what PHP runs on now.

What does it cost?

There are two licences. The Community licence is free: for personal projects, for teaching and learning, and for open-source projects, including their CI test runs and documentation builds. The commercial licence is for businesses.

Who makes it?

Marqius is commercial software from Simple AI LLC. It is independent of the wkhtmltopdf project and of the h4cc packages.