pdf2struct: extract structured JSON from PDFs (text, metadata, tables, OCR, invoice key-value fields).
Project description
pdf2struct
pdf2struct extracts structured JSON from PDF documents.
Supports:
- text extraction
- metadata extraction
- table extraction
- OCR fallback (optional)
- invoice-like key-value extraction
Install
pip install pdf2struct
OCR support:
pip install pdf2struct[ocr]
CLI
Extract PDF:
pdf2struct input.pdf --out output.json
Extract with OCR:
pdf2struct input.pdf --ocr --out output.json
Output JSON structure
- metadata
- pages (text + tables)
- detected_fields (invoice key-value pairs)
License
MIT
Project details
Release history Release notifications | RSS feed
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 pdf2struct-0.2.0.tar.gz.
File metadata
- Download URL: pdf2struct-0.2.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d03b17dddff747d3a75e95d26f1dc906c6444a923f22e9714d0cd227cdb69c5f
|
|
| MD5 |
bf4980cf58022dd58a3d7b82bf44c6ec
|
|
| BLAKE2b-256 |
3a9073fbb4fc43c1f788b368470d84682e3fa1fc0ffcb4d84ed48d129c9965f1
|
Provenance
The following attestation bundles were made for pdf2struct-0.2.0.tar.gz:
Publisher:
publish.yml on Kubenew/pdf2struct
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdf2struct-0.2.0.tar.gz -
Subject digest:
d03b17dddff747d3a75e95d26f1dc906c6444a923f22e9714d0cd227cdb69c5f - Sigstore transparency entry: 1357701939
- Sigstore integration time:
-
Permalink:
Kubenew/pdf2struct@74664ab92bf9efa568cec91abd8313d653357a93 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Kubenew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@74664ab92bf9efa568cec91abd8313d653357a93 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pdf2struct-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pdf2struct-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6397c71eb4863fdff1872483ba9ccfc083cc8963d2e863a120cefad56b57dcf9
|
|
| MD5 |
501911858474faac707b83df862c541b
|
|
| BLAKE2b-256 |
c571949157e2b799e55e8443454fbde2af251d9684ac1fade9efd20e9aac7fb7
|
Provenance
The following attestation bundles were made for pdf2struct-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Kubenew/pdf2struct
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdf2struct-0.2.0-py3-none-any.whl -
Subject digest:
6397c71eb4863fdff1872483ba9ccfc083cc8963d2e863a120cefad56b57dcf9 - Sigstore transparency entry: 1357702039
- Sigstore integration time:
-
Permalink:
Kubenew/pdf2struct@74664ab92bf9efa568cec91abd8313d653357a93 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Kubenew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@74664ab92bf9efa568cec91abd8313d653357a93 -
Trigger Event:
workflow_dispatch
-
Statement type: