Skip to main content

DocMax — Unified Document Processing CLI. Forge your documents from your terminal.

Project description

◆ DocMax

Forge your documents from the terminal.

PyPI version Python License: MIT Downloads Platform

DocMax Banner

DocMax is an all-in-one, offline-first document processing CLI published on PyPI.
Merge PDFs, run OCR, convert formats, batch-process folders, and more — all from a single, beautiful terminal interface.

InstallationUsageFeaturesScreenshotsContributing


✨ Feature Gallery

Main Menu
DocMax main menu — 10 tool categories, arrow-key navigation Launch with docmax — arrow-key navigation, guided workflows for every tool
PDF Tools
PDF Tools submenu 8 PDF operations — all interactive and guided
Compression Result
Compression showing 85% size reduction Ghostscript compression — real before/after sizes shown
OCR Workflow
OCR workflow with preprocessing steps 4-step preprocessing pipeline before Tesseract OCR
Batch OCR
Batch OCR with progress bar Multi-threaded batch processing with Rich progress bar
System Doctor
docmax doctor output table docmax doctor — checks all external tools, shows paths and install status

🚀 Features

📄 PDF Tools
Feature Command
Merge multiple PDFs docmax merge a.pdf b.pdf -o out.pdf
Split into pages docmax split report.pdf
Compress (Ghostscript) docmax compress large.pdf --preset ebook
Rotate pages docmax rotate file.pdf 90
Extract page range docmax pages file.pdf 1-5
Overlay watermark docmax watermark file.pdf logo.png
Encrypt with password docmax encrypt file.pdf
Decrypt docmax decrypt protected.pdf
🔍 OCR
Feature Command
OCR an image docmax ocr scan.png
OCR a PDF docmax ocr scan.pdf
Output as JSON or Markdown docmax ocr scan.pdf --fmt json
Multi-language OCR docmax ocr scan.png --lang eng+hin
Make scanned PDF searchable docmax searchable scan.pdf
Batch OCR a folder docmax batch-ocr invoices/
🔄 Document Conversion
Feature Command
Markdown → PDF docmax convert notes.md pdf
Markdown → DOCX docmax convert notes.md docx
DOCX → PDF docmax convert report.docx pdf
DOCX → Markdown docmax convert report.docx md
Images → PDF docmax img2pdf scans/
PDF → Images docmax pdf2img report.pdf --dpi 300 --fmt png
📂 Content Extraction
Feature Command
Extract text docmax text report.pdf
Extract embedded images docmax images report.pdf
Show / save metadata docmax metadata report.pdf -o meta.json
Extract tables (CSV/XLSX/JSON) docmax tables invoice.pdf --fmt xlsx
🖼 Image Processing
Feature Command
Enhance (contrast + sharpness) docmax enhance scan.png
Fix skewed scans (deskew) docmax deskew scan.png
Remove noise docmax denoise scan.png
Resize docmax resize photo.png --width 800
Full OCR preprocessing pipeline docmax preprocess scan.png

Interactive image tools (resize, crop, rotate, flip, convert format, watermark, remove background) are also available in the TUI.

⚡ Batch Processing & Watch Mode
Feature Command
Batch OCR with workers docmax batch ./docs --ocr --workers 8
Batch compress PDFs docmax batch ./pdfs --compress
Batch convert to Markdown docmax batch ./docs --convert md
Auto-OCR watched folder docmax watch ./incoming --ocr
Auto-compress watched folder docmax watch ./uploads --compress
Auto-make-searchable docmax watch ./scans --searchable
Auto-preprocess images docmax watch ./images --preprocess
⚙️ Setup & Diagnostics
docmax setup    # Auto-install external dependencies (Tesseract, Ghostscript, Pandoc, Poppler)
docmax doctor   # Check which tools are installed and configured

📦 Installation

Core (always works)

pip install docmax

Optional extras

Install only what you need:

# OCR support (Tesseract + pdf2image)
pip install "docmax[ocr]"

# Advanced image processing (OpenCV, rembg background removal)
pip install "docmax[image]"

# Table extraction from PDFs (pdfplumber, pandas, openpyxl)
pip install "docmax[tables]"

# Everything
pip install "docmax[full]"

External dependencies

Some features require system tools. Run docmax setup to auto-install them, or follow the manual links below.

Tool Purpose Auto-install
Tesseract OCR OCR engine
Ghostscript PDF compression
Pandoc Document conversion
Poppler PDF → image rendering
# Install & verify in two steps
docmax setup
docmax doctor

🖥 Usage

Interactive TUI

Launch the full interactive terminal UI with no arguments:

docmax

DocMax TUI

Navigate with arrow keys, select with Enter. Every tool section has its own guided workflow.

Command-Line Interface

DocMax also works as a traditional CLI — every feature is a subcommand:

# Show all commands
docmax --help

# Show version
docmax --version

📸 Screenshots

Main Menu

Main Menu

Animated: the full interactive menu on launch.

PDF Tools

PDF Tools Menu

Merge, split, compress, rotate, watermark, encrypt and decrypt — all guided.

OCR Workflow

OCR Demo

Animated: selecting a scanned PDF, choosing output format, and getting searchable text.

Compression Results

Compress Result

Side-by-side before/after size after Ghostscript compression.

Batch Processing

Batch OCR

Animated: batch OCR across a folder with a live progress bar.

System Doctor

Doctor Output

docmax doctor showing installed tool status and paths.


Adding screenshots: Place images under docs/images/ in the repository root.
Recommended filenames: banner.png, tui-main-menu.gif, pdf-tools-menu.png, ocr-demo.gif, compress-result.png, batch-ocr.gif, doctor-output.png, pdf-tools.png, ocr-tools.png, image-tools.png, conversion-tools.png, batch-tools.png, settings.png.
GIFs can be recorded with Terminalizer or VHS.


🗂 Project Structure

docmax/
├── cli.py                  ← Typer CLI entry point & dict-driven dispatch
├── menu.py                 ← All menu definitions (*_MENU dicts + menu functions)
├── config.py               ← Global defaults (DPI, presets, paths)
├── config_manager.py       ← Persistent config (~/.docmax/config.json)
├── banner.py               ← Rich ASCII banner
├── theme.py                ← Rich colour theme
├── loading.py              ← Spinner / Loader context manager
├── help.py                 ← Install-extras help panel
│
├── operations.py           ← PDF & image operations (merge, split, compress…)
├── engine.py               ← OCR engine (image OCR, PDF OCR, searchable PDF)
├── processor.py            ← Image preprocessing pipeline (enhance, deskew…)
├── converter.py            ← Document conversion (Pandoc, img2pdf, pdf2image)
├── extractor.py            ← Content extraction (text, images, metadata, tables)
├── batch.py                ← Parallel batch processing
├── watcher.py              ← Watchdog-based directory monitor
├── dependencies.py         ← Dependency checks & doctor
├── setup.py                ← Cross-platform dependency installer
└── utils.py                ← Shared utilities (abort, info, success…)

workflows/
├── __init__.py
├── common.py               ← Shared UI helpers (file picker, success/fail screens)
├── pdf.py                  ← All PDF tool workflows
├── ocr_tools.py            ← All OCR tool workflows
├── convert.py              ← All conversion workflows
├── extract.py              ← All extraction workflows
├── image.py                ← All image processing workflows
├── batch.py                ← Batch processing workflows
├── automation.py           ← Watch-folder automation workflows
└── settings.py             ← Settings, doctor, setup workflows

🤝 Contributing

Contributions, bug reports, and feature requests are welcome!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Make your changes and add tests where appropriate
  4. Open a pull request

Please keep PRs focused and describe what problem they solve.


📜 License

DocMax is released under the MIT License.
© Punith Naidu and DocMax Contributors.


PyPI · Issues · Discussions

Made with ♥ and Rich, Typer, and Questionary.

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

docmax-2.0.4.tar.gz (40.1 kB view details)

Uploaded Source

Built Distribution

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

docmax-2.0.4-py3-none-any.whl (46.0 kB view details)

Uploaded Python 3

File details

Details for the file docmax-2.0.4.tar.gz.

File metadata

  • Download URL: docmax-2.0.4.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docmax-2.0.4.tar.gz
Algorithm Hash digest
SHA256 70e417a5d88e99e610f43c58e5eb3336723ed4ae6b355530c2bad54ad84bbe92
MD5 1e2e2dbbec35031c920c3747ef7b3be4
BLAKE2b-256 4f12cad7c7295c25b6c293f69a4faf8d4f4b77ed4e75c9c75a5610db8c9b2c12

See more details on using hashes here.

Provenance

The following attestation bundles were made for docmax-2.0.4.tar.gz:

Publisher: publish.yml on megabyte44/DocMax

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

File details

Details for the file docmax-2.0.4-py3-none-any.whl.

File metadata

  • Download URL: docmax-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 46.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docmax-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f50437114e722b4bde235c3c2a9e88ae60ad445c676abf2acbec961226debe55
MD5 c974b00f7fb0b5648e5abfd16bddcc2d
BLAKE2b-256 49d559fe2c3f0489f045e8ae5f6fa09298201e4616b0144ab55851c12fa12709

See more details on using hashes here.

Provenance

The following attestation bundles were made for docmax-2.0.4-py3-none-any.whl:

Publisher: publish.yml on megabyte44/DocMax

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