#108
feat(document-scanner): scan, straighten, enhance, and export PDF
Closes #75
Closes #75
src/document-scanner/), an open-source browser digitizer inspired by Adobe Scan / CamScanner / Microsoft Lens workflows — original code, no proprietary assets. Closes / refs #75. ## Features (v0) - Open images or capture from the camera - Four-corner perspective correction (draggable handles) - Filters: document (local threshold), grayscale, contrast, threshold, original - Multi-page session with remove - Multi-page PDF export (embedded JPEGs) ## Validation cd src/document-scanner npm install npm test # 3 files, 9 passed npm run build ## Limitations - Manual corner placement (no ML auto-edge detector yet) - No OCR in v0 - Camera needs permission + secure context ## License MIT
The document scanner still feels very basic and needs significant improvements. The most important features, especially document edge detection, perspective correction, image filtering, and cropping, do not work reliably enough to produce clean, professional-looking scanned documents.
The filter and crop tools should be more accurate and intuitive. A good document scanner should automatically detect document boundaries, correct perspective distortion, remove shadows, improve contrast, and produce clear, readable scans.
In its current state, this implementation is not a reliable alternative to Adobe Scan or CamScanner. It needs better scanning algorithms, more precise cropping, effective filters, and a smoother user experience before it can compete with dedicated document-scanning apps.
I recommend improving the core scanning functionality first, particularly automatic edge detection, perspective correction, manual crop adjustment, and document enhancement. These are essential features, not optional extras, for a useful document scanner.