Skip to main content

elizaOS PDF Plugin - PDF reading and text extraction

Project description

elizaOS PDF Plugin (Python)

PDF reading and text extraction for elizaOS agents.

Installation

pip install elizaos-plugin-pdf

Usage

from elizaos_plugin_pdf import PdfClient

# Create client
client = PdfClient()

# Extract text from PDF file
text = await client.extract_text_from_file("document.pdf")
print(text)

# Extract text from PDF bytes
with open("document.pdf", "rb") as f:
    pdf_bytes = f.read()
text = await client.extract_text(pdf_bytes)
print(text)

# Get full document info
info = await client.get_document_info(pdf_bytes)
print(f"Pages: {info.page_count}")
print(f"Title: {info.metadata.title}")
for page in info.pages:
    print(f"Page {page.page_number}: {page.text[:100]}...")

Features

  • Extract text from PDF files
  • Get document metadata (title, author, etc.)
  • Page-by-page text extraction
  • Configurable text cleaning
  • Async/await support
  • Type-safe with Pydantic models

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

elizaos_plugin_pdf-2.0.0a5.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

elizaos_plugin_pdf-2.0.0a5-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file elizaos_plugin_pdf-2.0.0a5.tar.gz.

File metadata

  • Download URL: elizaos_plugin_pdf-2.0.0a5.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for elizaos_plugin_pdf-2.0.0a5.tar.gz
Algorithm Hash digest
SHA256 eae2ae54ad5f8703f8462be85a1420c0f1f44a0742b3019a6637c9062f351959
MD5 032f6aa7954406ccd8f0ea3243db7cda
BLAKE2b-256 189865d5d4d8c0c7a3de77c06bc8187fcd5df329cebcaff9e3983ce573979f5c

See more details on using hashes here.

File details

Details for the file elizaos_plugin_pdf-2.0.0a5-py3-none-any.whl.

File metadata

File hashes

Hashes for elizaos_plugin_pdf-2.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 215d01fe23521c2225bb41297dda027947995e95df10be4a545bc1ef241f8363
MD5 da71716cde59c4d3de4e4e3ba4210747
BLAKE2b-256 a3cf1851e50c6ce785525d800f15b9e9a4076521e762a3eee1fad71e18390145

See more details on using hashes here.

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