How rocketraman/sane-scan-pdf works
SANE Command-Line Scan to PDF is a Bash tool for acquiring scanner pages and producing combined or per-page PDFs. The documented workflow starts with CLI options and configuration, scans through SANE, post-processes pages, assembles PDFs, and optionally adds searchable OCR or opens the result. Scanner acquisition and page processing can run in parallel. The tree contains scan and scan_perpage, but no source excerpts were supplied, so internal call wiring is limited to relationships documented in the README; optional tools are shown separately.
Main entry points: scan Scan command · scan_perpage Per-page command
Components 16
CLI and configuration
- Scan command
scan - Option groups
Scan acquisition
- Per-page command
scan_perpage - SANE scanner
Page processing
- Scanned pages
- Unpaper deskew
- Image processing
- Threshold calculation
PDF output
- Image conversion
- PDF conversion
- PDF assembly
- OCR engine
- PDF output
- PDF viewer
- xdg-open
Other components
- CLI user
Connections 20
- CLI user → Scan command: runs
- Scan command → Option groups: reads
- Scan command → SANE scanner: scans
- Scan command → Per-page command: dispatches
- SANE scanner → Scanned pages: produces
- Scan command → Unpaper deskew: deskews with
- Scan command → Image processing: processes with
- Scan command → Threshold calculation: calculates with
- Scan command → Image conversion: converts with
- Scan command → PDF conversion: converts with
- Scan command → PDF assembly: joins with
- Scan command → OCR engine: runs OCR with
- Scan command → xdg-open: opens via
- Scanned pages → Image conversion: converts
- Image conversion → PDF conversion: feeds
- PDF conversion → PDF assembly: feeds
- PDF assembly → PDF output: produces
- OCR engine → PDF output: adds searchable text
- PDF output → xdg-open: opens in
- xdg-open → PDF viewer: launches