playa-pdf
Parallel and LazY Analyzer for PDFs
What it is and what it does
Playa-pdf is a pure-Python PDF reader designed to expose the internals of PDF files—pages, content streams, fonts, images, annotations, document outlines, and logical structure trees—through a lazy, parallelizable interface. It implements the layout analysis algorithm from pdfminer.six and offers both a Python API and a command-line tool for dumping PDF metadata and content. The package is not primarily a text extraction tool; its main strength is providing low-level access to PDF structure and metadata, with optional parallelization across multiple CPUs.
The library supports Python 3.8 through 3.13 and has no C++ dependencies, relying only on mypy-extensions at runtime. It is MIT licensed and actively maintained. While text extraction is possible, the documentation explicitly recommends other tools (pypdfium2, pypdf) for that use case alone. Playa-pdf is most useful when you need to inspect or manipulate PDF internals, extract structured metadata, or process large batches of PDFs in parallel.
Use it for:
- Extract and analyze document outlines, page trees, and logical structure trees from tagged PDFs for accessibility or content mapping.
- Dump all PDF operators and content streams from a document for low-level analysis or debugging.
- Batch-extract images and fonts from multiple PDFs in parallel using the lazy, parallelizable API.
- Access absolute positions and attributes of text, lines, paths, and images on each page for layout analysis.
- Read encrypted PDFs (with the crypto add-on) and inspect their metadata without full decryption overhead.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Playa-pdf reads PDF files and exposes their internal structure—pages, content streams, metadata, text, images, fonts, and logical structure trees—through a parallel, lazy, pure-Python interface with a command-line tool.
Yes, if you need low-level PDF structure access, metadata inspection, or parallel batch processing. The pure-Python, dependency-light design and MIT license make it a solid choice for those use cases. No, if your only goal is fast text extraction—use pypdfium2 or pypdf instead. Medium friction on install due to compiled wheels, but active maintenance and zero known vulnerabilities reduce risk.
Install
playa-pdf on PyPI
pip
pip install playa-pdfuv
uv add playa-pdfpoetry
poetry add playa-pdfInstalling playa-pdf
Before you install
Medium install friction due to compiled wheels for multiple Python versions and platforms (cp310–cp313, macOS/Linux/Windows). Active maintenance with recent releases. Single runtime dependency (mypy-extensions) keeps the dependency tree lean.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install playa-pdf
import playa
pdf = playa.open("document.pdf")
for page in pdf.pages:
print(f"Page {page.label}: {page.width} x {page.height}")
Requires Python 3.8 or newer. Optional: install playa-pdf[crypto] to read encrypted PDFs.
Verify before relying
- Whether the layout analysis algorithm implementation is materially faster than pdfminer.six in typical workflows outside the author's benchmarks.
- Whether text extraction quality and completeness match or exceed other pure-Python PDF libraries for real-world documents.
- Scope and stability of the command-line interface and its output formats across releases.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — mypy-extensions |
| Maintenance | actively maintained — 158 days since the last release |
| First released | |
| Downloads | 323,987/month — #7,600 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: playa_pdf-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl; playa_pdf-1.1.0-cp310-cp310-macosx_11_0_arm64.whl; playa_pdf-1.1.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; playa_pdf-1.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; playa_pdf-1.1.0-cp310-cp310-win_amd64.whl; playa_pdf-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl; playa_pdf-1.1.0-cp311-cp311-macosx_11_0_arm64.whl; playa_pdf-1.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; playa_pdf-1.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; playa_pdf-1.1.0-cp311-cp311-win_amd64.whl; playa_pdf-1.1.0-cp312-cp312-macosx_10_13_x86_64.whl; playa_pdf-1.1.0-cp312-cp312-macosx_11_0_arm64.whl; playa_pdf-1.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; playa_pdf-1.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; playa_pdf-1.1.0-cp312-cp312-win_amd64.whl; playa_pdf-1.1.0-cp313-cp313-macosx_10_13_x86_64.whl; playa_pdf-1.1.0-cp313-cp313-macosx_11_0_arm64.whl; playa_pdf-1.1.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; playa_pdf-1.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; playa_pdf-1.1.0-cp313-cp313-win_amd64.whl
Keywords: pdf parser, text mining
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
pdfminer.sixExtracts text, images, and layout information…
permissive · top 1,000 on PyPI
pdfminerExtracts text and layout information from PDF…
permissive · top 15,000 on PyPI
pdftextExtracts plain text or structured blocks,…
permissive · top 15,000 on PyPI
pdfrwpdfrw reads, writes, and manipulates PDF files…
permissive · top 5,000 on PyPI
pdfplumberExtract detailed information about text…
permissive · top 1,000 on PyPI
unPDFExtracts individual characters and metadata…
permissive · top 15,000 on PyPI
pdfrw2pdfrw2 reads, writes, and manipulates PDF files…
permissive · top 15,000 on PyPI
opendataloader-pdfExtracts structured data (Markdown, JSON, HTML)…
permissive · top 15,000 on PyPI
fillpdfFills, flattens, and manipulates PDF forms by…
permissive · top 15,000 on PyPI
pdftotextExtracts text from PDF files, including…
permissive · top 15,000 on PyPI