pdflite
pdf_md converts every page with pdf-oxide and fixes four things conversion gets wrong:
- a word broken across lines by a hyphen is rejoined
- a two-column table reflowed into one stream is swapped for the plain-text layer, when that strands fewer values
- a scanned page with no text layer goes through OCR
- reader chrome from a print-to-PDF is dropped
from pdflite import pdf_md
md = pdf_md('pdfs/attention_is_all_you_need.pdf', out_path='out'); md[:100] # out_path stores images
# pages = pdf_md('statement.pdf', out_path='out', pages=True) # one entry per page
Dictionary used where Stream expected, treating as empty stream
Dictionary used where Stream expected, treating as empty stream
Dictionary used where Stream expected, treating as empty stream
Dictionary used where Stream expected, treating as empty stream
'Provided proper attribution is provided, Google hereby grants permission to reproduce the tables and'
Each fix is exported on its own: clean_md, fix_layout, orphan_vals,
scrambled_layout, needs_ocr, ocr_parse, oxide_parse.
clean_md('a docu-\nment') # a hyphen split across lines
'a document'
orphan_vals('Opening balance\nFees\n1,240.00\n18.50') # values cut loose from their labels
2
Install
pip install pdflite
OCR needs liteparse, imported when it runs. No extras: an optional package is imported where it
is used and raises saying what to install.
Metadata
Release files for pdflite 0.0.3
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 |
|---|---|---|---|---|
| pdflite-0.0.3.tar.gz | 9.4 kB | Without provenance | Details for pdflite-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdflite-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pdflite-0.0.3-py3-none-any.whl |
Total release size: 19.0 kB
Release files / pdflite-0.0.3.tar.gz
| Download URL | pdflite-0.0.3.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee04f0b22b3d78f219db9294c96d9923a85f9c0eee291b699f04d6900138c7e2
|
|
BLAKE2b-256 checksum How to use checksums |
1123122a79213b175c894fffe78c9e87a126179fa0cf119574c42fede38fd1fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / pdflite-0.0.3-py3-none-any.whl
| Download URL | pdflite-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1d78df36486ebc3ba6d305e64994e6d9c56521a458ed48be1f269f5f1211668
|
|
BLAKE2b-256 checksum How to use checksums |
6b61239f99d7412fc47546007d14eeb61d9436230f1da2c862c1b710d112787a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for pdflite 0.0.3
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.