LlamaIndex reader for pdfmuse — deterministic PDF/DOCX parsing for RAG.
Project description
llama-index-readers-pdfmuse
LlamaIndex reader for pdfmuse — a deterministic PDF/DOCX parser for RAG. Same file in → same Documents out, with exact coordinates, tables and section structure.
pip install llama-index-readers-pdfmuse
Usage
from llama_index.readers.pdfmuse import PdfmuseReader
from llama_index.core import VectorStoreIndex
# RAG-optimized: one Document per block, section-aware metadata
docs = PdfmuseReader(mode="elements").load_data("report.pdf")
index = VectorStoreIndex.from_documents(docs)
Modes
mode |
Documents | Best for |
|---|---|---|
"single" |
the whole file as one | quick ingestion |
"page" (default) |
one per page | page-level retrieval |
"elements" |
one per block (heading / paragraph / table) | RAG — chunk with structure |
Metadata (elements mode)
Kept to simple types so it indexes cleanly:
source,source_kind(Pdf/Docx)page— 0-based page indexcategory—Title·NarrativeText·Tableheading_path— section breadcrumb, e.g."Experience > Alibaba"bbox—"x0,y0,x1,y1"on the page (top-left origin, points)
heading_path + bbox let a retriever return "which section, where on the page" —
not just a blob of text. And because the core has no probabilistic models, your index
is reproducible run-to-run.
MIT OR Apache-2.0 · part of the pdfmuse project.
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 llama_index_readers_pdfmuse-0.1.0.tar.gz.
File metadata
- Download URL: llama_index_readers_pdfmuse-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fbcc6a47ba6d77398b69738a45e18c083e85951f4d4f5f7807dcf59f63f536d
|
|
| MD5 |
b0e23062c870eaeec4fa1e888d53e63f
|
|
| BLAKE2b-256 |
d13be91746757c5e8aee29f8a7d14ccc59d178531cab9d0deb5204c7ac6d90f4
|
File details
Details for the file llama_index_readers_pdfmuse-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_readers_pdfmuse-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e651eb49a76a2c80ec6f415927c464a04f51ad65eda93eddbd36ea9c9f07063
|
|
| MD5 |
164fbfd5204670ee5a3c3a1a056a7f10
|
|
| BLAKE2b-256 |
b2a4207bb8aeb809153db02754b33f9ee4a588e1efba61aee43bd62878cde54b
|