pdify
pdify is a Python package to extract clean text layout structures and cohesive figures from PDF documents (like research papers or reports), preventing fragmented crops or nested image duplication.
Features
- Cohesive Figure Extraction: Groups overlapping/nested image elements into single cohesive crops.
- Layout Reconstruction: Reconstructs paragraphs and column spans in correct visual reading order.
- Hyphenation & Ligatures: Automatically resolves word hyphens and common ligatures.
- Parallel Processing: Uses multi-processing to extract content concurrently.
Installation
You can install pdify directly from PyPI:
pip install pdify
Note: Depending on your system and PDF files, you may also need ghostscript if rendering certain vector formats.
Usage
Command Line Interface (CLI)
Once installed, you can use the pdify CLI directly:
pdify --input path/to/document.pdf
Run pdify --help to view all available CLI options.
Python API
You can also import and use pdify programmatically in your own Python projects:
import pdfplumber
from pdify import extract_text_and_words_with_layout, get_cohesive_figure_boxes
# Open a PDF file
with pdfplumber.open("document.pdf") as pdf:
# Process the first page
page = pdf.pages[0]
# 1. Get cohesive figure boxes (automatically merging nested crops)
figure_boxes = get_cohesive_figure_boxes(page)
# 2. Extract text layout while ignoring headers/footers and text within figure boxes
text_content, words = extract_text_and_words_with_layout(
page,
remove_headers_footers=True,
exclude_figure_text=True,
figure_boxes=figure_boxes
)
print(text_content)
Output Structure
Outputs are saved to extracted_content/<pdf_name>/ by default:
text/: Clean page text (page_N_text.txt) and word coordinate metadata (page_N_text_metadata.json).images/: High-resolution cohesive figure crops (page_N_figure_M.png) and bounding box metadata (page_N_figure_M_metadata.json).
License
MIT License. See LICENSE for details.
Metadata
Release files for pdify 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdify-0.1.0.tar.gz | 11.2 kB | With provenance | Details for pdify-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pdify-0.1.0-py3-none-any.whl |
Total release size: 22.0 kB
Release files / pdify-0.1.0.tar.gz
| Download URL | pdify-0.1.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34f35bd70db686f9fa5f7ca3f449d0c99caef977a5967571a0c0633fb1e2ca51
|
|
BLAKE2b-256 checksum How to use checksums |
36869ce98d007aa8d7f007e07350eaa4d5957c06124f97a0870ebfd800c121f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logRelease files / pdify-0.1.0-py3-none-any.whl
| Download URL | pdify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3dc22880a96d4e44ade082ea50b9e9f7ca7407a0555a5040e2b9fde0e2b978c8
|
|
BLAKE2b-256 checksum How to use checksums |
2ba076801f6d45d3272f7c1b951402175c69ec351ac9612d53f656e2a0e6836c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logSecurity for pdify 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pdify-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.