Skip to main content

PDF Text Extraction

CI License: MIT

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

pdf_extraction_tool-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf_extraction_tool-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

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

Hashes for pdf_extraction_tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d17d29d3a92cdf52cb5ae65fda7c55784ead5be36ae9132dcc3854328cbca6c0
MD5 77d9b27658d8bf2815c27b157075fefc
BLAKE2b-256 630206b989f87aabe7f033a322fb26c3062c0501d475d27239a8ba08b0052262

See more details on using hashes here.

File details

Details for the file pdf_extraction_tool-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pdf_extraction_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74a57eb28f922b00cce4dab41eaf0a0a21781f72297429dab4bc8ecd870d3af2
MD5 901479cfdb5ed46bb1cd3e551edbae6a
BLAKE2b-256 364fda950f6304270b11445f432b848f5209e953b5ad88505f722af58196dbc7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page