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
Metadata
Release files for pdf2struct 0.2.0
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 |
|---|---|---|---|---|
| pdf2struct-0.2.0.tar.gz | 4.0 kB | With provenance | Details for pdf2struct-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdf2struct-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pdf2struct-0.2.0-py3-none-any.whl |
Total release size: 8.9 kB
Release files / pdf2struct-0.2.0.tar.gz
| Download URL | pdf2struct-0.2.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d03b17dddff747d3a75e95d26f1dc906c6444a923f22e9714d0cd227cdb69c5f
|
|
BLAKE2b-256 checksum How to use checksums |
3a9073fbb4fc43c1f788b368470d84682e3fa1fc0ffcb4d84ed48d129c9965f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.
Transparency logRelease files / pdf2struct-0.2.0-py3-none-any.whl
| Download URL | pdf2struct-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6397c71eb4863fdff1872483ba9ccfc083cc8963d2e863a120cefad56b57dcf9
|
|
BLAKE2b-256 checksum How to use checksums |
c571949157e2b799e55e8443454fbde2af251d9684ac1fade9efd20e9aac7fb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.
Transparency logSecurity for pdf2struct 0.2.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pdf2struct-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.
Transparency logA 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.