Skip to main content

Pypi Windows Server Pypi Ubuntu Server

PyPI PyPI Downloadst

📄 pdfsp


pdfsp is a Python package that extracts tables from PDF files and saves them to Excel. It also provides a simple Streamlit app for interactive viewing of the extracted data.


🚀 Features

  • Extracts tabular data from PDFs using pdfplumber
  • Converts tables into pandas DataFrames
  • Saves output as .xlsx Excel files using openpyxl
  • Ensures column names are unique to prevent issues
  • Visualizes DataFrames with streamlit

📦 Installation

Make sure you're using Python 3.10 or newer, then install with:

pip install pdfsp -U

python script

# pdf.py
from pdfsp import extract_tables, Options

# Define extraction options
source_folder = "."
output_folder = "output"
combine_tables = True

options = Options(
    source_folder=source_folder,
    output_folder=output_folder,
    combine=combine_tables
)

# Run the table extraction
extract_tables(options)

From console / Terminal / Command Line

# Extract all tables from all PDF files in the current folder and save them to the current folder
pdfsp . .

# Extract and COMBINE large tables (spanning multiple pages) into single files, saved to the current folder
pdfsp . . --combine

# Extract and COMBINE tables, skipping the first row of each table (e.g., header rows)
pdfsp . . --combine --skiprows=1

# Extract all tables from PDF files in 'someFolder' and save them to 'SomeOutFolder'
pdfsp someFolder SomeOutFolder

# Extract all tables from 'some.pdf' and save them to the current folder
pdfsp some.pdf .

# Extract all tables from 'some.pdf' and save them to 'toThisFolder'
pdfsp some.pdf toThisFolder
=== 📊 Extraction Summary Report ===
✅ Successful Files: 3
   - pdfs/report1.pdf → 🗂️ 5 tables extracted
   - pdfs/summary2.pdf → 🗂️ 3 tables extracted
   - pdfs/report2.pdf → 🗂️ 7 tables extracted

❌ Failed Files: 1
   - pdfs/corrupted.pdf

⚠️ Some files failed to process. See details above.

Metadata

Release files for pdfsp 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdfsp 0.1.14
File Size Uploaded
pdfsp-0.1.14.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdfsp 0.1.14
File Interpreter ABI Platform
pdfsp-0.1.14-py3-none-any.whl Python 3 none any Details

Total release size: 20.0 kB

Release files / pdfsp-0.1.14.tar.gz

Download URL pdfsp-0.1.14.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e1e32164c0b3661e7401f6d78f3f843b45b182a907a5ab17995abbccc2b32efa
BLAKE2b-256 checksum
How to use checksums
127d0b1a996853e92708dd36feca053d44c11eb3a95a825fdea3a44f5bc1513e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.3

Release files / pdfsp-0.1.14-py3-none-any.whl

Download URL pdfsp-0.1.14-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b14c38ba1b7d2c871d15f3f64084bef391362b1173f4453a158bb167887f6cd
BLAKE2b-256 checksum
How to use checksums
e2840a747e86b36f1604ba8d14db58113a2824bcb6d289aa82222f32d048f63e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.3

Release history Release notifications | RSS feed

This release

0.1.14 This release

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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