skillfed

unPDF

Quickly extract text characters and character metadata from pdfs using pdfium.

unpdf v1.0.0 102.0K downloads/30d#12,899 on PyPI
Permissive license Apache-2.0 AGING released

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 unpdf

uv

uv add unpdf

poetry

poetry add unpdf

Installing 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

pdf text extractioncharacter-level pdf parsingpdf metadata extractionpdf font and color infopdfium python wrapperpdf bounding box extractionpdf character positioning
pdf-extractiondocument-analysis

More Text Processing packages