PDF Text Extraction
Small utility for extracting text from PDF files with multiple backend support.
Installation
pip install pdf-extraction-tool
Or from source:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev,backends]"
Usage
# Basic usage (uses PyPDF2 backend)
extract-pdf path\to\file.pdf
# Use pdfminer backend (requires pdfminer.six)
extract-pdf --backend pdfminer path\to\file.pdf
# Extract from encrypted PDF
extract-pdf --password secret path\to\file.pdf
The extracted text is written to the terminal. Redirect it to a file when needed:
extract-pdf path\to\file.pdf > output.txt
Backends
| Backend | Install | Notes |
|---|---|---|
pypdf2 (default) |
Included | Fast, good for most PDFs |
pdfminer |
pip install pdfminer.six |
Better layout preservation, handles complex fonts |
Verify
python -m py_compile extract_pdf.py
extract-pdf --help
Keep source PDFs and generated output outside Git unless they are explicitly safe to share.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdf_extraction_tool-0.1.0.tar.gz.
File metadata
- Download URL: pdf_extraction_tool-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d17d29d3a92cdf52cb5ae65fda7c55784ead5be36ae9132dcc3854328cbca6c0
|
|
| MD5 |
77d9b27658d8bf2815c27b157075fefc
|
|
| BLAKE2b-256 |
630206b989f87aabe7f033a322fb26c3062c0501d475d27239a8ba08b0052262
|
File details
Details for the file pdf_extraction_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pdf_extraction_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74a57eb28f922b00cce4dab41eaf0a0a21781f72297429dab4bc8ecd870d3af2
|
|
| MD5 |
901479cfdb5ed46bb1cd3e551edbae6a
|
|
| BLAKE2b-256 |
364fda950f6304270b11445f432b848f5209e953b5ad88505f722af58196dbc7
|