Skip to main content

LlamaIndex reader for oxidize-pdf — fast, Rust-powered PDF parsing with element-disjoint RAG chunking

Project description

llama-index-readers-oxidize-pdf

LlamaIndex reader backed by oxidize-pdf, a fast Rust-powered PDF engine with first-class RAG chunking.

0.1.1 (2026-04-22) — Requires oxidize-pdf>=0.4.3 (oxidize-pdf-core 2.5.5). Fixes a regression carried by 0.1.0: the underlying HybridChunker in oxidize-pdf-core 2.5.4 re-injected just-flushed elements through its overlap branch, so each Document produced by mode="rag" contained the previous one as a prefix (quadratic accumulation). 0.1.1 is the first release where the disjointness contract is verified end-to-end by semantic regression tests; 0.1.0 should not be used for RAG ingestion.

Install

pip install llama-index-readers-oxidize-pdf

Usage

RAG chunks (default)

from llama_index.readers.oxidize_pdf import OxidizePdfReader

reader = OxidizePdfReader()  # mode="rag" by default
documents = reader.load_data("paper.pdf")

for doc in documents:
    print(doc.metadata["chunk_index"], doc.metadata["heading_context"])
    print(doc.text[:200])

Each Document carries:

Field Description
chunk_index 0-based index within the document
page_numbers list of 1-indexed pages covered by the chunk
element_types list of semantic types detected (e.g. title, paragraph)
heading_context nearest surrounding heading, or None
token_estimate rough token count for budget planning
file_path / file_name / total_pages / pdf_version source metadata

One document per page

reader = OxidizePdfReader(mode="pages")
docs = reader.load_data("paper.pdf")
for doc in docs:
    print(doc.metadata["page_number"], len(doc.text))

Whole PDF as markdown

reader = OxidizePdfReader(mode="markdown")
[doc] = reader.load_data("paper.pdf")
print(doc.text)

Why oxidize-pdf

  • Rust parser: fast on large PDFs, low memory footprint.
  • Native RAG primitives: element-disjoint semantic chunking, element partitioning, heading-aware context — no post-processing needed. The disjointness contract (no chunk's text is a substring of another's; each source element appears in exactly one chunk) is enforced by regression tests in both this reader and the underlying bridge.
  • CJK friendly: compact output for multibyte documents (see oxidize-pdf 2.5.4 subsetter fixes).
  • Pure Python install: ships as a wheel for Linux/macOS/Windows via the oxidize-pdf package; no system dependencies.

Source

Part of oxidize-pdf-integrations, the ecosystem of integrations around oxidize-pdf. The Rust core and Python bridge live in oxidize-python.

License

MIT

Project details


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_oxidize_pdf-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file llama_index_readers_oxidize_pdf-0.1.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_oxidize_pdf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 baa9d82f156cc7e3158fbb759763083749802ed15bba06366cc2e9e2449c3483
MD5 b482b44705a009935c2f99c1e2b80d5d
BLAKE2b-256 311c862b1e8e61ac70d691065ba61321275389129df0a9362cd023c892f3ffe1

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_oxidize_pdf-0.1.1.tar.gz:

Publisher: release-llamaindex.yml on bzsanti/oxidize-pdf-integrations

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llama_index_readers_oxidize_pdf-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_oxidize_pdf-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9627c129626722bbceff8e471f316087ccb20ac9d252f121689c26680e1fa979
MD5 73304978ee428a250c63f78148ceaf3b
BLAKE2b-256 6eb8ee7eb57dbd5f3237efca04112252ee3f61c241316b080b72fa3dafdb9a3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_oxidize_pdf-0.1.1-py3-none-any.whl:

Publisher: release-llamaindex.yml on bzsanti/oxidize-pdf-integrations

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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