pdfminer.six pulls text out of the page content stream
Community maintained fork of pdfminer - we fathom PDF
At a glance
- What is it?
- pdfminer.six is a Python PDF parser that recovers text, layout and glyph attributes from the document's own operators instead of from a rendered bitmap. That choice decides both what it handles well and where it goes quiet: extractable digital text can include positions, fonts and colours; image-only scans need OCR, while scans with an existing text layer may yield text. Extraction quality depends on the PDF.
- Who is it for?
- Adopt pdfminer.six when your documents are born digital and you need glyph positions, font names or per-run colour rather than a flat string, and test a representative corpus, including scans with or without OCR text layers. Do not adopt it as a turnkey reader for scanned archives, as the only path to bulk throughput on a schedule, or as something you can report a bug and wait on, since the project asks you to send the pull request yourself.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 8 months ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- pdfminer/pdfminer.six7,058 ★ · +31
| Repository | 2026-09-23 | 2026-11-22 |
|---|---|---|
| pdfminer/pdfminer.six | 7k | 7.1k |
31 Stars in the last 60 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
pdfminer.six reads the page content stream, not a rendered page
The project's stated method is to extract the text from a page directly from the sourcecode of the PDF. That single sentence decides everything else about it. Text operators inside the page describe where glyphs sit, which font they use and what colour they are drawn in, so a parser working from them can hand back the exact location, font or colour of the text rather than just its characters. That data is what layout analysis runs on, and what makes hOCR output a natural product instead of an afterthought.
The same decision sets the boundary. A page drawn as a picture holds no text operators, and a page whose characters were converted to outlines holds no font to report. Nothing in the declared dependencies can recognise pixels, so the parser has nothing to work with on such a file and returns what it finds, which is very little.
Specification coverage is broad but qualified by the project itself. The README claims support for PDF-1.7 and immediately parenthesises it as well, almost. Alongside that sit Type1, TrueType, Type3 and CID fonts, RC4 and AES decryption, AcroForm extraction, table of contents and tagged contents, and decoders for ASCIIHexDecode, ASCII85Decode, LZWDecode, FlateDecode, RunLengthDecode and CCITTFaxDecode. Read the parenthesis as the project's own warning that edge cases remain.
pip install pdfminer.six, then pdf2txt.py on a file
Python 3.10 or newer is the floor, and the required dependency list is short: charset-normalizer at 2.0.0 or above, and cryptography at 36.0.0 or above.
pip install pdfminer.sixImage extraction is a second, separate install, because the decoder lives in an extra rather than in the required set.
pip install 'pdfminer.six[image]'The README's first real command takes a file path and writes the extracted text to standard output, so redirect it or pipe it wherever you need the result.
pdf2txt.py example.pdfFrom Python, the same job goes through the high_level helper, which returns the text as a string instead of writing to a stream.
from pdfminer.high_level import extract_text
text = extract_text("example.pdf")
print(text)What you should see is the text of the document. If a file with plainly visible words comes back empty or nearly empty, the reason is almost always that the page holds an image rather than text, which the next section covers.
Two scripts ship out of tools/, and the wheel carries one package
pyproject.toml declares `packages = ["pdfminer"]`, so the distribution installs a single top-level package, and `script-files` pointing at `tools/pdf2txt.py` and `tools/dumppdf.py` is what puts two commands on your path. Only the first is described in the README. Nothing at the root of the repository says what `dumppdf.py` prints or which flags it takes, so treat its output format as undocumented and read its help text before depending on it.
The rest of the tree explains where the maintenance burden sits: `cmaprsrc/` holds CMap source data, `docs/` the documentation build, `fuzzing/` the fuzz harness, `tests/` the test suite, `tools/` the scripts and `uv.lock` a pinned dependency resolution.
The Makefile labels itself as being for maintenance purpose, and its install target is a maintainer workflow rather than a user one.
uv sync --all-groups --all-extras --no-install-projectThe no-install-project flag means contributors sync the toolchain and test dependencies without installing pdfminer.six itself, because the project under test is the working tree.
Pillow is the only decoder in the image extra
The optional dependency group is one entry: `image = ["Pillow"]`. There is no compiled extension of pdfminer.six's own; the README lists JPG, PNG, TIFF, JBIG2 and plain bitmaps among the embedded image formats it can extract.
The consequence is concrete for deployments. A container or virtualenv built with the plain `pip install pdfminer.six` does not include Pillow, which the README presents as an optional extra for extracting images. If your pipeline extracts images from some documents and text from others, the two installs have to be kept in step deliberately, because the README presents the extra as optional and gives no runtime signal that a document contains images.
cryptography at 36.0.0 or newer sits in the required set rather than an extra, which is consistent with the RC4 and AES decryption the README claims as features. An encrypted document does not require a second install to be readable.
Image-only scans require a separate OCR step
Follow the stated method through to its conclusion. Text is recovered from the sourcecode of the PDF, so a page that consists of a single image contributes an image and no text. The required dependencies contain charset-normalizer and cryptography; neither performs character recognition, and no OCR engine appears anywhere in the declared dependency set.
The samples tree includes `scancode/`, `encryption/`, `acroform/`, `contrib/` and `nonfree/` folders, plus files named `simple1.pdf` through `simple5.pdf`, `font-size-test.pdf`, `test_pattern_colors.pdf` and `zen_of_python_corrupted.pdf`. For an image-only page, OCR is a separate step; a scanned PDF that already contains an OCR text layer can have that layer extracted.
For a reader, the practical consequence is a silent failure rather than a loud one. Extraction from image-only scans may return no text because the library does not recognize pixels. A scanned PDF with an existing text layer may produce text, though its quality depends on that layer. A batch job can otherwise report success while extracting little or nothing. Check the shape of your inputs before you build the schedule, not after.
The whole decode path runs in the Python interpreter
The project describes itself as written entirely in Python, and the required dependencies are Python packages. Nothing in the distribution is a compiled parser. Glyph decoding, operator interpretation, colour and font resolution and the automatic layout analysis all execute inside your interpreter, on your CPU, in your process.
The repository's own testing setup points the same way. There is a `fuzzing/` directory and an `atheris` entry in the dependency groups, plus a deliberately corrupted sample in `samples/`. That is a project spending its testing effort on malformed input and crashes, which is a different goal from throughput, and no figure for documents per second appears in the project's documentation.
So for bulk conversion, the reader has no published number to plan against. A job that has to turn tens of thousands of files on a nightly schedule has to be measured on its own corpus first, because the cost of a page depends on how much is drawn on it, and a vector-heavy page costs far more to interpret than a short text page. Treat any capacity plan as something you measured, not something you read.
Cmap tables are generated files that only make cmap refreshes
CJK language support and vertical writing are real features, and they rest on data files rather than on code. The Makefile builds four compressed mapping tables into `pdfminer/cmap/`: `to-unicode-Adobe-CNS1.json.gz`, `to-unicode-Adobe-GB1.json.gz`, `to-unicode-Adobe-Japan1.json.gz` and `to-unicode-Adobe-Korea1.json.gz`. Each is produced from a `cid2code_*.txt` file in `cmaprsrc/` by `tools/conv_cmap.py`, with explicit encoding overrides on the command line such as `-c UniCNS-UTF8=utf-8` for the CNS1 set and `-c UniGB-UTF8=utf-8` for GB1.
Read that as a build step with a human in it. The tables only change when someone runs `make cmap`, the `cmap_clean` target exists to delete them, and the conversion is parameterised per language set. A plain install therefore carries whatever tables were generated at the last release, and a mapping correction reaches users only through a release.
The consequence shows up as wrong characters rather than as an error. When CJK text comes back with substituted or mojibake glyphs, the thing to check is whether the mapping table for that Adobe character set is present and current, not whether your calling code is right.
Last push was 2026-03-13, and the fix is yours to send
The last push on the default branch landed on 2026-03-13. The recent release tags are calendar dates: 20260107, 20251230 and 20251229, three releases inside a three-week window at the turn of the year, with nothing tagged since January.
More telling is what the project says about itself. It describes itself as a community maintained fork of the original PDFMiner with limited maintainer availability, and states plainly that the best way to get an issue resolved is to submit a pull request yourself. Read that as an operating constraint rather than a formality: a fix that matters to your pipeline is work you schedule, review and maintain on your side.
On version and platform support, pyproject.toml requires Python 3.10 or newer and classifies 3.10 through 3.14, takes its version from setuptools-scm, and configures ruff with a py310 target; mypy, pytest, pre-commit and codespell sit in the dev groups. The licence is MIT, and the repository acknowledges code from pyHanko with that project's licence kept at `docs/licenses/LICENSE.pyHanko`. There is no documented compatibility policy against the original PDFMiner, and no stated deprecation window for the high_level API.
Editorial conclusion
Adopt pdfminer.six when your documents are born digital and you need glyph positions, font names or per-run colour rather than a flat string, and test a representative corpus, including scans with or without OCR text layers. Do not adopt it as a turnkey reader for scanned archives, as the only path to bulk throughput on a schedule, or as something you can report a bug and wait on, since the project asks you to send the pull request yourself. Check the language coverage of your files against the bundled cmap tables and run your own corpus through pdf2txt.py before committing to a conversion schedule.
Frequently asked questions
How do I install pdfminer.six?
Install Python 3.10 or newer, then run pip install pdfminer.six. Add pip install 'pdfminer.six[image]' when you also need embedded images, since the image extra is what pulls in Pillow.
How do I use pdfminer.six to pull text out of a PDF?
Run pdf2txt.py with a file path from the command line, or call the high_level helper from Python: extract_text("example.pdf") from pdfminer.high_level returns the text as a string. The library reads the page sourcecode of the PDF, so text that exists only as a picture in the file will not appear.
What is pdfminer.six?
It is a community maintained fork of the original PDFMiner, written entirely in Python and released under the MIT licence. It extracts text from a page directly from the sourcecode of the PDF and can also report the exact location, font or colour of that text.
Is pdfminer.six safe to install and depend on?
It is MIT licensed and declares two required runtime dependencies, charset-normalizer at 2.0.0 or above and cryptography at 36.0.0 or above, with Pillow added only by the image extra. It also decrypts RC4 and AES protected documents, so untrusted input is parsed by the same code path as trusted input.
How does pdfminer.six differ from the original pdfminer?
pdfminer.six is the community maintained fork of the original PDFMiner, requiring Python 3.10 or newer and classifying support through Python 3.14, with ruff configured to target py310. The project states its own maintainer availability is limited and asks contributors to send pull requests, and it documents no compatibility policy against a particular upstream release.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/pdfminer-pdfminer-six)Star history chart for your README
[](https://hysenlabs.com/projects/pdfminer-pdfminer-six)Was this useful?