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.0a4.tar.gz (8.2 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.0a4-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for elizaos_plugin_pdf-2.0.0a4.tar.gz
Algorithm Hash digest
SHA256 cbb0daaf0d01a8622803736d4d30f588126caf853cec6420a02cc997b3d5847a
MD5 23ec077d3b8d013536370d53fd28d394
BLAKE2b-256 e8a63466c889e7ab7a4c973d45a8699fa30f31968d455777f850b1fb77904d4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elizaos_plugin_pdf-2.0.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 f6d37faec8a8f94a4da29a6243610563fba9c10a6dca4fd5f60adae318de0a49
MD5 24bb617a9e376201c9ffcb04e6a5c9ec
BLAKE2b-256 cc766a540639cb0be0c626ba95ea18754c0ad7efecf07bf3a22339c0b3ba629b

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