ToPDF

How it works

The technology behind on-device scanning, explained for curious humans: edge detection, perspective math, OCR, MRZ and browser AI.

How document edge detection works (finding paper in a photo)From pixels to four corners: the classical vision tricks and neural networks that let a scanner find your document on a messy table. Perspective correction: how a tilted photo becomes a flat pageThe geometry that un-tilts your scans: homographies in human language, why four corners are enough, and where the limits are. How OCR works: from pixels to textOptical character recognition demystified — preprocessing, line finding, neural sequence reading — and what ToPDF uses it for. What is the MRZ? Your passport’s machine-readable zone, decodedThose two lines of letters and <<< at the bottom of a passport encode your identity with built-in error checking — here’s how they work. AI in the browser: how WebAssembly made on-device scanning possibleNeural networks used to need servers. WASM changed the math — here’s how vision models now run privately inside a browser tab. Scan enhancement explained: what “cleanup” actually doesShadow flattening, adaptive brightening, local contrast, gentle sharpening — the measured, per-page pipeline between your photo and the PDF. How scans know which way is up: orientation detectionA tiny classifier looks at your cropped page and picks 0/90/180/270 before you ever see it — here’s how, and why it beats metadata guessing. What’s a PWA? Why ToPDF can install like an appProgressive Web Apps in plain terms: how a website earns a home-screen icon, offline mode and app-like behaviour without an app store. Why ToPDF cannot see your documents (architecture, not policy)The difference between “we don’t look at your files” and “we can’t”: a walk through an architecture with no place for your data to go. Do megapixels matter for document scanning?Why a 12 MP phone out-scans a 48 MP one with worse habits: the real resolution math of documents, and where more pixels genuinely help.

Scan it now — free & private

Snap a photo, get a clean auto-cropped PDF in seconds. Everything runs in your browser — your documents never leave your device.

Open the scanner