Skip to main content

PDF Reader

A hybrid PDF indexing and search system designed for AI assistant integration via MCP (Model Context Protocol). Rather than dumping entire PDF content into context windows, this tool provides intelligent document processing, full-text search, and optimized image handling.

Features

  • Hybrid Processing: Local (tesserocr) and remote (Modal cloud) OCR processing
  • Smart Search: Tantivy-based full-text search with BM25 ranking and query escaping
  • AI Enhancement: LLM-generated document titles and page summaries
  • Provider Optimization: Automatic image resizing for OpenAI/Anthropic API limits
  • MCP Integration: RESTful API for seamless AI assistant integration

Quick Start

# Activate virtual environment
source .venv/bin/activate

# Example usage (if you have an existing index)
python -c "
from pdf_reader.index import PDFIndex
index = PDFIndex.load('indexes/index2')
results = index.search_pages(['your search term'])
print(f'Found {len(results)} results')
"

Architecture

The system uses a hybrid approach:

  • Tantivy: Fast full-text search across OCR text and AI summaries
  • SQLite: Blob storage for complete page data (text + images)
  • AI Enhancement: Document titles and page summaries via LLM
  • Provider-Aware Images: Optimized for different LLM API requirements

MCP Tools

  • list_pdfs: List available PDF documents
  • search_pdfs: Keyword search across all documents
  • read_pdf: Read specific pages from a document
  • read_pdfs: Bulk read across multiple documents

Development

See CLAUDE.md for detailed architecture documentation, development guidelines, and troubleshooting information.

Metadata

Release files for pdf-reader-0jsfjf 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdf-reader-0jsfjf 0.1.0
File Size Uploaded Provenance Actions
pdf_reader_0jsfjf-0.1.0.tar.gz 35.5 kB Without provenance Details for pdf_reader_0jsfjf-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pdf-reader-0jsfjf 0.1.0
File Interpreter ABI Platform Actions
pdf_reader_0jsfjf-0.1.0-py3-none-any.whl Python 3 none any Details for pdf_reader_0jsfjf-0.1.0-py3-none-any.whl

Total release size: 76.1 kB

Release files / pdf_reader_0jsfjf-0.1.0.tar.gz

Download URL pdf_reader_0jsfjf-0.1.0.tar.gz
Size 35.5 kB
Tags Source
SHA-256 checksum
How to use checksums
df7f1c4a0b1867c14259c9b441bfcd2a066aac11864c6a7f0490587e78f48625
BLAKE2b-256 checksum
How to use checksums
e7141ab472918acbb47c96233b265ab3e618daba3fb4fa7db60b816ec75b488b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.14

Release files / pdf_reader_0jsfjf-0.1.0-py3-none-any.whl

Download URL pdf_reader_0jsfjf-0.1.0-py3-none-any.whl
Size 40.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0710ee74a9ad722dca34ed45d91f3384d6cb09e5e70f0eeba678094031efa57
BLAKE2b-256 checksum
How to use checksums
f0ac76f215a0d6cd08570528a1f6c8be169f4977f2bdd465d71e95914a05cbf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.14

Security for pdf-reader-0jsfjf 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page