Skip to main content

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 index
  • categoryTitle · NarrativeText · Table
  • heading_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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_pdfmuse-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_pdfmuse-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_pdfmuse-0.1.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_pdfmuse-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3fbcc6a47ba6d77398b69738a45e18c083e85951f4d4f5f7807dcf59f63f536d
MD5 b0e23062c870eaeec4fa1e888d53e63f
BLAKE2b-256 d13be91746757c5e8aee29f8a7d14ccc59d178531cab9d0deb5204c7ac6d90f4

See more details on using hashes here.

File details

Details for the file llama_index_readers_pdfmuse-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_pdfmuse-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e651eb49a76a2c80ec6f415927c464a04f51ad65eda93eddbd36ea9c9f07063
MD5 164fbfd5204670ee5a3c3a1a056a7f10
BLAKE2b-256 b2a4207bb8aeb809153db02754b33f9ee4a588e1efba61aee43bd62878cde54b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page