langchain-pdfmux
LangChain document loader for pdfmux -- self-healing PDF extraction for RAG pipelines.
Why pdfmux?
Most PDF loaders use a single extraction method and silently fail on complex layouts. pdfmux routes each page through the best extraction pipeline automatically:
- Smart routing -- selects the optimal parser per page (text-heavy, scanned, tables, mixed)
- Confidence scoring -- every chunk includes a confidence score so your RAG pipeline can filter or re-rank
- Self-healing -- retries with alternative extractors when the primary one returns low-quality output
Install
pip install langchain-pdfmux
Usage
from langchain_pdfmux import PDFMuxLoader
docs = PDFMuxLoader("report.pdf").load()
Each Document includes metadata with extraction quality signals:
loader = PDFMuxLoader("report.pdf", quality="high")
for doc in loader.lazy_load():
print(doc.metadata)
# {
# "source": "report.pdf",
# "title": "Q4 Results",
# "page_start": 1,
# "page_end": 3,
# "tokens": 820,
# "confidence": 0.94
# }
Options
# Quality presets: "fast", "standard" (default), "high"
loader = PDFMuxLoader("report.pdf", quality="high")
# Load all PDFs in a directory
loader = PDFMuxLoader("./papers/")
# Custom glob pattern
loader = PDFMuxLoader("./papers/", glob="**/*.pdf")
# Streaming with lazy_load
for doc in PDFMuxLoader("large.pdf").lazy_load():
process(doc)
License
MIT
Metadata
Release files for langchain-pdfmux 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 |
|---|---|---|---|---|
| langchain_pdfmux-0.2.0.tar.gz | 5.4 kB | Without provenance | Details for langchain_pdfmux-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_pdfmux-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_pdfmux-0.2.0-py3-none-any.whl |
Total release size: 10.2 kB
Release files / langchain_pdfmux-0.2.0.tar.gz
| Download URL | langchain_pdfmux-0.2.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
118e0083f71e8904decef1b6f60267b1dfa5a1c864995f681e5a6b60386662bc
|
|
BLAKE2b-256 checksum How to use checksums |
ecc899e521c502d81cf5c571cf2584baf58a063f32d0419fab650f43f9d7e71d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / langchain_pdfmux-0.2.0-py3-none-any.whl
| Download URL | langchain_pdfmux-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0947cec5a963a76bc6bd68e72a3ed0a534ed79870f180de44db0419322cf5f84
|
|
BLAKE2b-256 checksum How to use checksums |
c8d3576c9e32a085a1a36221b0a71ac6c61abc5a021b95bacbbe5ca3e24cb666
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for langchain-pdfmux 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.
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.