A unified Python CLI + library combining MTcli PDF (19 commands) and MTcli Image (21 commands) in one package — with automatic platform detection for Android (Pydroid3 / Termux), Linux, macOS, and Windows.
pip install . # core (PDF + Image, no OCR)
pip install ".[ocr]" # + Tesseract OCR support
pip install ".[all]" # everythingPydroid3 / Termux: use
pip install . --break-system-packagesif needed.
mt <tool> <command> [options]
mt -config <subcommand>
mt pdf compress report.pdf --quality 55 --scale 0.6
mt pdf merge a.pdf b.pdf c.pdf -o combined.pdf
mt pdf split doc.pdf --pages 1-3,5,8-10
mt pdf rotate doc.pdf --angle 90
mt pdf watermark doc.pdf --text CONFIDENTIAL
mt pdf encrypt doc.pdf --password s3cr3t
mt pdf info doc.pdf
mt pdf extract-text doc.pdf
mt pdf page-numbers doc.pdf --position top-right --start 1
mt pdf header-footer doc.pdf --header "My Corp" --footer "Page {page} of {total}"
mt pdf repair damaged.pdf
mt pdf redact doc.pdf --keywords "John Smith" "SSN: 123"
mt pdf extract-images doc.pdf --min-width 200
mt pdf images-to-pdf photo1.jpg photo2.png -o album.pdf
mt pdf ocr scanned.pdf --lang eng
mt pdf pdf-to-md report.pdf
mt pdf remove-blank scanned.pdf
mt pdf pdf-to-images book.pdf # browser render (all PDFs)
mt pdf pdf-to-images scan.pdf -e # XObject extraction (scanned only)
mt pdf extract-tables data.pdfmt image compress photo.jpg -q 80 -f WEBP
mt image resize photo.jpg --width 800
mt image resize *.jpg --scale 50
mt image thumbnail photo.jpg --sizes 128,256,512
mt image watermark photo.jpg --text "© 2026" --position bottom-right
mt image watermark photo.jpg --logo logo.png --opacity 60
mt image stitch a.jpg b.jpg --mode vertical
mt image collage *.jpg --layout grid
mt image metadata photo.jpg
mt image metadata-remove *.jpg
mt image bg-remove photo.jpg --api-key YOUR_KEY
mt image histogram photo.jpg
mt image dominant-color photo.jpg --count 6 --save
mt image ocr scan.png --lang eng
mt image duplicates ./photos/ --similar
mt image hide photo.jpg --message "Secret"
mt image reveal photo_hidden.png
mt image ascii photo.jpg --color
mt image beautify screenshot.png --title "My App"
mt image color-mix "#FF0000" "#0000FF" --ratio 50
mt image color-shades "#3B82F6"
mt image color-scheme "#3B82F6"
mt image color-save "#3B82F6" --size 1024mt -config show # view all settings
mt -config set pdf.tesseract_cmd /path/to/tesseract
mt -config set pdf.tessdata_prefix /path/to/tessdata
mt -config set image.tesseract_cmd /path/to/tesseract
mt -config set image.default_quality 80
mt -config get pdf.tesseract_cmd
mt -config reset
mt -config path| Platform | Path |
|---|---|
| Pydroid3 / Termux | /sdcard/multi_tools/config.json |
| Linux / macOS | ~/.multi_tools/config.json |
| Windows | C:\Users\<you>\.mt\config.json |
mt --platform # show detected platform + Tesseract pathsTesseract is auto-detected in these locations:
| Platform | Binary path |
|---|---|
| Pydroid3 | /data/user/0/ru.iiec.pydroid3/app_HOME/tesseract |
| Termux | $PREFIX/bin/tesseract |
| Linux | /usr/bin/tesseract or which tesseract |
| macOS | /opt/homebrew/bin/tesseract (Apple Silicon) |
| Windows | C:\Program Files\Tesseract-OCR\tesseract.exe |
Override via config or --tesseract-cmd:
mt -config set pdf.tesseract_cmd /custom/path/tesseract
mt pdf ocr scanned.pdf --tesseract-cmd /custom/path/tesseractfrom multi_tools import pdf
from multi_tools import image
# ── PDF ──────────────────────────────────────────────────────
pdf.compress("report.pdf", "out.pdf", quality=55, scale=0.6)
pdf.merge(["a.pdf", "b.pdf", "c.pdf"], "combined.pdf")
pdf.split("doc.pdf", "1-3,5,8-10", "out.pdf")
pdf.rotate("doc.pdf", 90, "out.pdf")
pdf.watermark("doc.pdf", "CONFIDENTIAL", "out.pdf")
pdf.encrypt("doc.pdf", "s3cr3t", "out.pdf")
sections = pdf.info("report.pdf")
for title, lines in sections.items():
print(title)
for line in lines: print(" ", line)
pdf.extract_text("doc.pdf", "out.txt")
pdf.ocr("scanned.pdf", "out.txt", lang="eng")
pdf.pdf_to_md("report.pdf", "report.md")
pdf.add_page_numbers("doc.pdf", "numbered.pdf", position="bottom-center")
pdf.add_header_footer("doc.pdf", "out.pdf", header="My Corp", footer="Page {page} of {total}")
pdf.repair("damaged.pdf", "fixed.pdf")
pdf.redact("doc.pdf", ["John Smith", "SSN"], "clean.pdf")
pdf.extract_images("doc.pdf", "images.zip")
pdf.images_to_pdf(["a.jpg", "b.png"], "album.pdf", page_size="a4")
pdf.remove_blank_pages("scan.pdf", "clean.pdf")
pdf.extract_tables("data.pdf", "tables/")
pdf.pdf_to_images_embedded("scan.pdf", "pages/", fmt="jpg")
# Low-level class access
from multi_tools.pdf import PDFProcessor
# ── Image ─────────────────────────────────────────────────────
image.main(["compress", "photo.jpg", "-q", "80", "-f", "WEBP"])
image.main(["resize", "photo.jpg", "--width", "800"])
image.main(["watermark", "photo.jpg", "--text", "© 2026"])
image.main(["ocr", "scan.png", "--lang", "eng"])
image.main(["thumbnail", "photo.jpg", "--sizes", "128,256,512"])
image.main(["collage", "a.jpg", "b.jpg", "--layout", "grid"])pip install Pillow pypdf reportlab
pip install pytesseract # then install Tesseract via Pydroid3 Plugins
pkg install python tesseract
pip install Pillow pypdf reportlab pytesseract
sudo apt install tesseract-ocr
pip install Pillow pypdf reportlab pytesseract
brew install tesseract
pip install Pillow pypdf reportlab pytesseract
- Download Tesseract from https://github.com/UB-Mannheim/tesseract/wiki
pip install Pillow pypdf reportlab pytesseractmt -config set pdf.tesseract_cmd "C:\Program Files\Tesseract-OCR\tesseract.exe"
python -m mt pdf compress report.pdf
python -m mt image resize photo.jpg --width 800
python -m mt --helpMulti Tools CLI · MIT License · © 2026 Faraz Ali · GitHub