ScanPDF
Open the app: scanpdf.io · Source: github.com/scanpdf-io/scanpdf

ScanPDF turns photos of paper documents into clean, flatbed-scan-quality multi-page PDFs, entirely in the browser. There are no accounts, no uploads and no server-side processing: documents never leave the device.
Features
- Automatic corner detection: several OpenCV.js strategies (Canny edges, brightness and saturation masks, adaptive threshold, Hough lines) propose sheet outlines, and each one is scored geometrically.
- Manual adjustment: drag the corner handles with a magnifier loupe and a live preview of the result.
- Perspective and size correction: pages come out flat and straight, fitted to the sheet or sized to an exact format (ISO and US paper, ID cards, passports, business cards, envelopes and more).
- Scan filters: Color, Grayscale and Black & White. B&W divides by the background instead of thresholding, so shadows disappear and text stays smooth.
- Even out lighting: removes shadows and the shading along a book's spine.
- Split a spread: one photo of an open book becomes two straightened pages.
- Multi-page PDF: reorder, duplicate and delete pages, then save one PDF assembled locally with pdf-lib.
- File size limit: pick a maximum from 10 MB down to 200 KB and the pages are recompressed to fit while text stays readable.
- Installable and offline: a PWA with a service worker; on Android it is a share target (Share → ScanPDF).
- Nine languages, each on its own URL.
Privacy
Image processing (OpenCV.js in WebAssembly) and PDF assembly (pdf-lib) run in the browser. The app has no backend and sends no document data over the network.
Self-hosting
The container image ships nginx with a strict Content-Security-Policy, so the browser itself blocks every external request:
docker run -d --rm -p 8080:80 ghcr.io/scanpdf-io/scanpdf
# open http://localhost:8080
Each release also has a zip with the static files for any web server.
Tech
Plain HTML, CSS and vanilla ES modules with no build step at run time. Localized pages are generated by a dependency-free Python script. Dependencies (OpenCV.js 4.9.0, pdf-lib 1.17.1) are pinned by URL and SHA-256.