computer-science
Show HN: Make PDFs look scanned (CLI or in the browser via WASM)
Key takeaways
- 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.
- 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).
- Requires Go and a C toolchain (go-fitz links Mu PDF via cgo, so the binary is self-contained — nothing to install at runtime).
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).
Requires Go and a C toolchain (go-fitz links Mu PDF via cgo, so the binary is self-contained — nothing to install at runtime).
Article preview — originally published by Hacker News. Full story at the source.
Read full story on Hacker News →
More top stories
Aggregated and edited by the Scoop newsroom. We surface news from Hacker News alongside other reporting so you can compare coverage in one place.
Editorial policy · Corrections · About Scoop