malahov.io

Run A4Norm yourself: Docker and Claude Code

The same pipeline that makes the scan in the browser runs on your own machine: an image for docker run, two variants of it — latest and full — and a skill for Claude Code. The code is open, MIT licence.

Updated 2026-09-30

A4Norm runs right in the browser, with nothing to install. But the same pipeline also comes as a tool for your own machine — for many scans, for a script, or to check what exactly happens to the photo.

The code

The processing is written in Rust and built as WebAssembly: the same code runs in the browser and in Telegram. MIT licence, everything on GitHub — read it or run it yourself.

docker run

bash
docker run --rm -v "$PWD:/work" ghcr.io/georg-malahov/a4norm:latest \
  -o /work/document.pdf /work/page1.jpg /work/page2.jpg

The image is about 40 MB to download and about 105 MB unpacked, and it never goes online. Both images are in the GitHub registry, the Dockerfiles in the repository.

Why there are two images

latest is the tool itself: about 105 MB on disk, the same Rust pipeline that runs in the browser, plus ImageMagick and poppler to read HEIC and PDF; no models.

full is the same plus one segmentation model that kicks in only when the sheet cannot be found by brightness — a white page on a light desk, say. It is bigger, and most people never need it.

The browser — on the A4Norm page and in Telegram — runs the tool without the model, like latest.

Claude Code

There is a skill for Claude Code: Claude recognises a request like "make a scan of this" and runs the same code. All skills are here.

Other questions are in the FAQ.