Skip to main content

Cross-platform document scanner: crop, perspective-correct, enhance, OCR, and combine into PDF.

Project description

Scanlite

Release License: MIT Python 3.10+

Turn photos of documents into clean, searchable PDFs.

Load scanned pages or photos from your phone, let Scanlite straighten, crop, and clean them automatically, reorder as needed, and export a single PDF with an optional OCR text layer.

Quick Start

pip install scanlite
scanlite

Or grab a native installer from Releases: .msi (Windows) · .dmg (macOS Apple Silicon) · .deb / .rpm (Linux)

Features

Import

  • PDF (rendered at 200 DPI), PNG, JPG, TIFF, BMP, WebP
  • Multi-page PDFs split into individual pages automatically
  • Drag-and-drop support (when tkdnd is available)

Processing

  • Auto-crop: Otsu threshold + contour detection trims to the document edge

  • Auto-perspective: Canny edge detection finds a 4-point quadrilateral and warps it flat

  • Scan enhance: three modes that produce a clean, scanner-like look:

    Mode What it does
    auto Detects page brightness; picks B&W for white pages, CLAHE for darker ones
    bw Adaptive Gaussian threshold for pure black-on-white text
    gray CLAHE contrast enhancement for photos or diagrams
  • Every operation works per-page or as a batch across all pages

  • Reset any page to its original at any time

Reorder and Manage

  • Move Up / Move Down (or arrow keys) to reorder
  • Delete to remove a page
  • Thumbnail panel shows the current page order at a glance

Export

  • PDF: combines all pages into a single document
  • PDF + OCR: Tesseract generates an invisible text layer per page, making the output searchable and copy-pasteable
  • Keyboard shortcuts: Ctrl+S export, Ctrl+Shift+S export with OCR

Installation

pip (all platforms)

pip install scanlite
scanlite          # launch the GUI

Native installers

Download from Releases:

Platform File Install
Windows x64 Scanlite-x.y.z.msi Double-click; installs to Program Files with Start Menu shortcut
macOS ARM64 Scanlite-x.y.z.dmg Open, drag to Applications
Debian/Ubuntu scanlite-x.y.z.deb sudo dpkg -i scanlite-x.y.z.deb
Fedora/RHEL scanlite-x.y.z.rpm sudo rpm -i scanlite-x.y.z.rpm

OCR dependency

OCR export requires Tesseract installed separately:

# Windows (winget)
winget install UB-Mannheim.TesseractOCR

# macOS
brew install tesseract

# Debian/Ubuntu
sudo apt install tesseract-ocr

# Fedora
sudo dnf install tesseract

The app works fine without Tesseract; you just cannot use the "Export PDF + OCR" button.

Keyboard Shortcuts

Key Action
Ctrl+O Import files
Up / Down Navigate pages
Delete Remove selected page
Ctrl+S Export PDF
Ctrl+Shift+S Export PDF + OCR

How It Works

Scanlite's processing pipeline runs perspective correction first (to avoid cropping a skewed quad), then crop, then enhancement. Each step is independent and can be applied or skipped per page.

The perspective detector looks for the largest 4-sided contour in the edge map and computes a homography to warp it into a rectangle. If no quadrilateral is found, the image passes through unchanged.

The scan enhancer auto-detects whether a page is mostly white (median brightness > 170) and picks adaptive thresholding for text-heavy pages or CLAHE for photos and diagrams.

System Requirements

  • Python 3.10+
  • Tesseract OCR (optional, for searchable PDF export)

Support

"Software is like sex: it's better when it's free." -- Linus Torvalds

If this tool saved you a trip to the copy shop, buying me a coffee is a nice way to say thanks.

Buy Me A Coffee

License

MIT (see LICENSE.md)

Citation

@software{scanlite,
  author = {Colling, Gilles},
  title = {Scanlite: Cross-Platform Document Scanner},
  year = {2026},
  url = {https://github.com/gcol33/scanlite}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scanlite-0.1.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scanlite-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file scanlite-0.1.0.tar.gz.

File metadata

  • Download URL: scanlite-0.1.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for scanlite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 88c93549790df8a67223289497013a91c62a7064d1765c86d18398418b47cdbb
MD5 573621846a2f0b37072d355221694076
BLAKE2b-256 96b198e5bbb24b03155815095e39ba2f86829665fd54ca689d8632e0f9dbd67d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanlite-0.1.0.tar.gz:

Publisher: release.yml on gcol33/scanlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scanlite-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: scanlite-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for scanlite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 366caee0b429a8f544e51d6d5c0692033312284c821c48034863329931a0711d
MD5 57b4033252bd1b7d6196b6df17480876
BLAKE2b-256 09c4436ab499e708d247ea8564ad52b7f5c634e4be689fa1b5a0c313a10260ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanlite-0.1.0-py3-none-any.whl:

Publisher: release.yml on gcol33/scanlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page