📄 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
pandasDataFrames - Saves output as
.xlsxExcel files usingopenpyxl - 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdfsp-0.1.14.tar.gz | 7.4 kB | Without provenance | Details for pdfsp-0.1.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdfsp-0.1.14-py3-none-any.whl | Python 3 | none | any | Details for pdfsp-0.1.14-py3-none-any.whl |
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
|
Security for pdfsp 0.1.14
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.