termux-pdf-document-analysis

Extract, OCR, and verify PDF documents on Android Termux using CLI and Python tools.

1|Updated Jul 22, 2026
One-click install
npx skills add https://github.com/IceHeartGitH/Hermes-Agent-Android-Termux --skill termux-pdf-document-analysis-iceheartgith
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: termux-pdf-document-analysis
Source: https://github.com/IceHeartGitH/Hermes-Agent-Android-Termux/tree/main/custom-skills/productivity/termux-pdf-document-analysis
Command: npx skills add https://github.com/IceHeartGitH/Hermes-Agent-Android-Termux --skill termux-pdf-document-analysis-iceheartgith

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pypdfium2, pdfplumber, pytesseract, and includes references (resource) components.

What problem does it solve? Analyzing PDFs on Android Termux is difficult because heavyweight document parsers often fail to build on mobile, and Python packages must work in both the Hermes virtual environment and the global Termux Python. This Skill provides a lightweight, verified workflow for reading, extracting, rendering, and OCR-ing PDFs on a phone. ## Core Features & Use Cases - Lightweight Tool Stack: Installs poppler, qpdf, tesseract, and ImageMagick via pkg, plus pypdf, pypdfium2, pdfplumber, and pytesseract via pip, avoiding heavy parsers like pymupdf, docling, or marker. - Dual-Runtime Verification: Checks that Python packages import correctly in both the Hermes venv and the global/system Python, with a full verification checklist and smoke tests on real PDFs. - OCR and Vision Workflows: Renders pages with pdftoppm for vision analysis or tesseract OCR, including Bulgarian language data setup via tessdata. - Use Case: A user receives a scanned Bulgarian invoice PDF on their phone. The Skill renders pages at high DPI, runs tesseract with eng+bul languages, and extracts text and tables with pdfplumber for summarization. ## Quick Start Ask the agent to install the PDF analysis tools on Termux and extract the text and tables from a specific PDF file, verifying the setup works in both the Hermes venv and global Python.

Frequently Asked Questions about termux-pdf-document-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract text from a PDF on Android Termux?▼

Install poppler with pkg and run pdftotext with the -layout flag for fast text extraction. For tables and layout-aware parsing, install pdfplumber via pip and use its extract_text and extract_tables methods on each page.

How to OCR a scanned PDF in Termux with tesseract?▼

Render pages to PNG with pdftoppm at 250 DPI, then run tesseract on each image with the desired languages such as -l eng+bul. If OCR quality is weak, try different --psm modes and higher rendering resolution.

What PDF tools work on Android Termux without heavy builds?▼

The recommended stack is poppler utilities (pdfinfo, pdftotext, pdftoppm), qpdf, tesseract, ImageMagick, plus Python packages pypdf, pypdfium2, pdfplumber, and pytesseract. Heavy tools like pymupdf, docling, marker, and OCRmyPDF may source-build or time out on Termux.

Does pdfplumber work in both the Hermes venv and global Python?▼

Yes, but it must be installed separately in each runtime. Install with pip --user in the global Python and with the venv interpreter at ~/.hermes-venv/hermes-agent/venv/bin/python, then verify imports in both using importlib.util.find_spec.

How do I add Bulgarian OCR language support to tesseract on Termux?▼

Download bul.traineddata from the tessdata_fast GitHub repository into $PREFIX/share/tessdata. Then run tesseract with -l eng+bul to OCR pages containing Bulgarian text.

Why avoid pymupdf or docling for PDF analysis on Termux?▼

These tools may require source builds or pull heavy dependencies like PyTorch and numpy, which can time out or consume excessive storage and CPU on a phone. The lightweight poppler and pdfplumber stack covers most analysis tasks, with heavy tools re-evaluated only when explicitly needed.