pdftext
Extract structured text from pdfs quickly
Decision gist · record as of 2026-08-14
Yes. Active maintenance, low install friction, Apache licensing, no known vulnerabilities, and strong extraction accuracy (97.54% alignment vs. PyMuPDF on benchmarks) make this a solid choice for PDF text extraction. Install if you need structured extraction with font metadata, want to avoid AGPL, or prefer pypdfium2's architecture. Not suitable if you require right-to-left bidi reordering or need thread-safe extraction without process workers.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- pypdfium2 is not thread-safe; use the built-in workers= option for parallelism or process pools, not threads.
- Low friction: pure Python wheel with five runtime dependencies (click, numpy, pydantic, pydantic-settings, pypdfium2).
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—no copyleft obligations or AGPL concerns.
last release 2026-07-08 (37 days) · last repo commit 2026-07-08 · 716 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 555,402 downloads/mo, #6,027 on PyPI
Alternatives
Verify before relying
pip install pdftext
from pdftext.extraction import plain_text_output
text = plain_text_output('document.pdf', sort=False, hyphens=False)- Whether the 97.54% alignment score vs. PyMuPDF holds across diverse real-world PDF types beyond the 200-document benchmark set.
- Performance characteristics on very large PDFs (hundreds of pages) with the workers= option.
- Completeness of right-to-left script handling compared to PyMuPDF's bidi reordering for Arabic and Hebrew documents.
What it is and what it does
PDFText is a Python library and CLI tool that extracts text from PDFs in plain-text or structured JSON format, grouping content into pages, blocks, lines, and spans with font metadata and bounding boxes. It wraps pypdfium2, a fast and accurate PDF rendering library, and offers an Apache-licensed alternative to PyMuPDF for extraction tasks that do not require AGPL compliance.
You can use it as a command-line tool to convert PDFs to text files or JSON, or call its extraction functions directly from Python code. It supports encrypted PDFs, page ranges, parallel extraction via process workers, and optional reading-order sorting. The library handles CJK, Cyrillic, Greek, and other left-to-right scripts correctly; right-to-left scripts are returned in the order pdfium reports them, which may differ from logical reading order.
Use it for
- Batch convert PDFs to plain text or JSON for downstream NLP and document analysis pipelines.
- Extract structured block and line data with font info and bounding boxes for document layout analysis or OCR-free text mining.
- Parse encrypted PDFs with password support in automated workflows.
- Extract text from specific page ranges or use parallel workers to speed up extraction on large document collections.
- Build a PDF text extraction service that avoids AGPL licensing constraints of PyMuPDF.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance, low install friction, Apache licensing, no known vulnerabilities, and strong extraction accuracy (97.54% alignment vs. PyMuPDF on benchmarks) make this a solid choice for PDF text extraction. Install if you need structured extraction with font metadata, want to avoid AGPL, or prefer pypdfium2's architecture. Not suitable if you require right-to-left bidi reordering or need thread-safe extraction without process workers.
Install
pdftext on PyPI
Before you install
Low friction: pure Python wheel with five runtime dependencies (click, numpy, pydantic, pydantic-settings, pypdfium2). Active maintenance, last commit 2026-07-08, 716 repository stars. Requires Python 3.10 or later.
Requires Python 3.10 or later. pypdfium2 is not thread-safe; use the built-in workers= option for parallelism or process pools, not threads.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—no copyleft obligations or AGPL concerns.
Quickstart
pip install pdftext
from pdftext.extraction import plain_text_output
text = plain_text_output('document.pdf', sort=False, hyphens=False)
Verify before relying
- Whether the 97.54% alignment score vs. PyMuPDF holds across diverse real-world PDF types beyond the 200-document benchmark set.
- Performance characteristics on very large PDFs (hundreds of pages) with the workers= option.
- Completeness of right-to-left script handling compared to PyMuPDF's bidi reordering for Arabic and Hebrew documents.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesclicknumpypydanticpydantic-settingspypdfium2 |
| Maintenance | Actively maintained 37 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 555,402 / month, #6,027 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: pdftext-0.7.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pdf text extraction”
- pdftextExtracts plain text or structured blocks, lines, and spans from PDFs…
- pdfminer.sixExtracts text, images, and layout information from PDF documents by…
- pdfplumberExtract detailed information about text characters, rectangles,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also pypdfium2 · unPDF · pdf-oxide · pdfplumber · camelot-py · pdfminer · pymupdf · playa-pdf · pypdftk · pymupdf-layout