Back to directory

make-look-scanned

A command-line tool, also runnable in the browser through WebAssembly, that degrades a PDF to look like a physical scanner output, with adjustable skew, grain, blur, and paper tone.

make-look-scanned

make-look-scanned is a command-line tool that takes a PDF and makes it look like a scan of a printed page: it applies skew, grayscale conversion, a warm paper tint, scanner grain, defocus, edge shadow, and JPEG compression artifacts. Each page is rasterized to an image, run through the effect pipeline, and reassembled into a new image-only PDF, so the original selectable text is not preserved.

Every effect is controlled by a numeric flag that can be set to zero to disable it, and reusable presets can be defined in a configuration file and selected by name. Output is deterministic by default, since the random seed is derived from the input file's content, so the same input always produces the same result unless a different seed is requested.

The same effect pipeline also runs client-side in a browser through a WebAssembly build. It is written in Go and requires a C toolchain to build, since it links the MuPDF library through cgo.

More in CLI tools

See all 181
  • grev

    github.com

    A set of Unix coreutils-style filters — grep, sort, cut and more — that answer a plain-language question about each record instead of matching a pattern, using a small decision model.

  • A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

  • gpusched

    github.com

    A VRAM-aware GPU job scheduler for a single machine: declare how much memory each shell command needs, and it places jobs the moment a GPU has room and reports when a guess was wrong.