unPDF
Quickly extract text characters and character metadata from pdfs using pdfium.
What it is and what it does
unPDF is a Python library that extracts text and metadata from PDF files at the character level using PDFium. It returns four table objects—pages, characters, text objects, and fonts—each containing structured data: character positions and bounding boxes, font sizes and names, RGBA color values, and transformation matrices. The library ships with no runtime dependencies and optionally integrates with PyArrow for conversion to pandas or polars DataFrames.
The package is designed for developers who need precise, granular access to PDF content rather than simple text extraction. It exposes low-level PDFium data structures directly, making it suitable for document analysis, layout reconstruction, and metadata-driven workflows. Installation requires Python >=3.9 and uses precompiled wheels for common platforms.
Use it for:
- Extract character positions and bounding boxes for document layout analysis or OCR validation.
- Retrieve font metadata and color information to reconstruct visual styling or detect formatting changes.
- Convert PDF character data to pandas/polars DataFrames for statistical analysis or data science pipelines.
- Build custom text reconstruction logic that preserves spatial relationships and transformation matrices.
- Analyze multi-language PDFs by accessing unicode character codes and mapping errors.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extracts individual characters and metadata from PDF files using PDFium, returning character positions, fonts, colors, and transformation matrices without external dependencies.
Yes, if you need character-level PDF metadata and positioning. The zero-dependency design and precompiled wheels make installation straightforward. However, the aging maintenance status (400 days since release) and lack of visible repository activity suggest limited ongoing support—verify stability for production use before committing.
Install
unpdf on PyPI
pip
pip install unpdfuv
uv add unpdfpoetry
poetry add unpdfInstalling unPDF
Before you install
Medium install friction due to compiled wheels for multiple Python versions and platforms (cp310–cp313, macOS/Linux/Windows). Aging maintenance status (400 days since release) suggests limited ongoing support.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; attribution required.
Quickstart
pip install unpdf
from unpdf import extract
pages, chars, text_objs, fonts = extract("document.pdf")
text = ''.join(chr(c) for c in chars.arrays['char'])
print(text)
Requires Python >=3.9; PyArrow optional but recommended for data analysis workflows.
Verify before relying
- Whether PDFium is bundled in wheels or requires separate system installation.
- Performance characteristics on large PDFs or high-volume extraction tasks.
- Stability and bug-fix frequency given aging maintenance status.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 400 days since the last release |
| First released | |
| Downloads | 101,999/month — #12,899 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: unpdf-1.0.0-cp310-cp310-macosx_11_0_arm64.whl; unpdf-1.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; unpdf-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; unpdf-1.0.0-cp310-cp310-win_amd64.whl; unpdf-1.0.0-cp310-cp310-win_arm64.whl; unpdf-1.0.0-cp311-cp311-macosx_11_0_arm64.whl; unpdf-1.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; unpdf-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; unpdf-1.0.0-cp311-cp311-musllinux_1_2_aarch64.whl; unpdf-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl; unpdf-1.0.0-cp311-cp311-win_amd64.whl; unpdf-1.0.0-cp311-cp311-win_arm64.whl; unpdf-1.0.0-cp312-cp312-macosx_11_0_arm64.whl; unpdf-1.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; unpdf-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; unpdf-1.0.0-cp312-cp312-musllinux_1_2_aarch64.whl; unpdf-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl; unpdf-1.0.0-cp312-cp312-win_amd64.whl; unpdf-1.0.0-cp312-cp312-win_arm64.whl; unpdf-1.0.0-cp313-cp313-macosx_11_0_arm64.whl
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
pdfplumberExtract detailed information about text…
permissive · top 1,000 on PyPI
pdftextExtracts plain text or structured blocks,…
permissive · top 15,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pdfminerExtracts text and layout information from PDF…
permissive · top 15,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
pdfminer.sixExtracts text, images, and layout information…
permissive · top 1,000 on PyPI
fillpdfFills, flattens, and manipulates PDF forms by…
permissive · top 15,000 on PyPI
pymupdf-fontsProvides a collection of optional fonts…
unclear · top 15,000 on PyPI
pdf-oxideExtracts text, images, and metadata from PDFs…
permissive · top 15,000 on PyPI
playa-pdfPlaya-pdf reads PDF files and exposes their…
permissive · top 15,000 on PyPI