Menu

1 / 2

GitHub - overflowy/make-look-scanned: Makes PDFs look scanned (CLI or in the browser via WASM)

Hacker News·5 months ago
#rJTgs2PD
#github#look#scanned#browser#wasm
Reading 0:00
15s threshold

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.

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.

in.scanned.pdf make-look-scanned in.pdf -o out.pdf make-look-scanned in.pdf --noise 0.4 --skew 2.5 --jpeg-quality 30"> make-look-scanned in.pdf # -> in.scanned.pdf make-look-scanned in.pdf -o out.pdf make-look-scanned in.pdf --noise 0.4 --skew 2.5 --jpeg-quality 30

Flags

Flag Default Meaning

-o <input>.scanned.pdf output path

--preset…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.