On-screen text
overflowy
AGPL-3.0 license
README.md
make-look-scanned
A CLI that takes a PDF and degrades it to look like a physical scan of a printout — skew, grayscale, warm paper tone, scanner grain, defocus, edge shadow, and JPEG compression artifacts. Also runs client-side in the browser via WASM.
Anatomy of the Somatosensory System
Anatomy of the Somatosensory System
PRINTING A CLEAN PDF, SIGNING IT, AND SCANNING IT BACK IN JUST TO MAKE IT LOOK OFFICIAL IS A PROCESS DIGITAL FILES SHOULDN'T NEED.
Each page is rasterized to an image, run through the effect pipeline, and reassembled into a new image-only PDF (the original selectable text is gone — faithful to a basic scanner).
Build
Requires Go and a C toolchain (go-fitz links MuPDF via cgo, so the binary is self-contained — nothing to install at runtime).
go build -o make-look-scanned .
Usage
make-look-scanned [flags] input.pdf
Flags may appear before or after the input filename.
make-look-look-scanned in.pdf -> # -> out.pdf
make-look-scanned in.pdf -o out.pdf
make-look-scanned in.pdf --noise 0.4 --skew 2.5
Flags
Flag
Default
Meaning
-o
output path
--preset
-
named preset from config.toml
--seed
content hash
random seed (override for a new look)
--force
false
overwrite an existing output file
--dni
150
render
SLIGHT SKEW, GRAYSCALE CONVERSION, WARM PAPER TONE, GRAIN, JPEG ARTIFACTS
A CRISP DIGITAL FILE LOOKS LIKE IT CAME OFF AN OFFICE SCANNER.
make-look-scanned --preset medium in.pdf
Precedence: built-in defaults → selected preset → explicit CLI flags (flags always win).
Browser (WebAssembly)
The effect pipeline also runs in the browser. go-fitz/MuPDF can't compile to wasm, so the browser uses PDF.js to rasterize pages and hands the pixels to the same Go effects + assembly code compiled to wasm.
Dev (needs network for the PDF.js CDN):
./web/build.sh
# builds w
(cd web && python3 -m http.server 8080)
# ther
Single self-contained file (works offline, nothing to serve):
task build:web
# writes d:
dist/make-look-scanned.html inlines the wasm, Go's runtime glue, and PDF.js (library + worker) as base64 — open it directly in a browser. Output is visually equivalent to the CLI but not byte-identical, since PDF.js and MuPDF rasterize differently.
License
AGPL-3.0
which is AGPL-3.0, so the combined binary is AGPL-3.0 — distributing it requires offering the corresponding source.
The browser build does not include MuPDF (it uses PDF.js).
make-look-scanned
Make a PDF look like a scan — entirely in your browser.
Nothing is uploaded.
Choose File
No file chosen
Effects
Skew (°)
Paper tone
Noise
Blur (σ)
Edge shadow
JPEG quality
Render DPI
Grayscale
Seed (optional)
0.6
0.6
0.08
0.4
0.15
70
150
from file content
Scan PDF
Ready — choose a PDF.
RUNS AS A GO CLI OR ENTIRELY IN THE BROWSER VIA WEBASSEMBLY, FULLY LOCAL, DETERMINISTIC OUTPUT.