skillfed

playa-pdf

Parallel and LazY Analyzer for PDFs

playa-pdf v1.1.0 324.0K downloads/30d#7,600 on PyPI
Permissive license MIT Active released

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-pdf

uv

uv add playa-pdf

poetry

poetry add playa-pdf

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Science/ResearchProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Text Processing

Tags

pdf parsing and extractionpdf metadata and structuretext and image extraction from pdfpdf content stream analysisparallel pdf processingpdf logical structure treelow-level pdf access
pdf-parsingparallel-processingcli-tool

More Text Processing packages