PDFMind
An agent for extracting structured content from PDFs using LangGraph and OpenAI.
Features
- Extract and format text content from PDFs
- Convert tables to markdown format
- Extract images with AI-generated descriptions
- Use LangGraph for agent-based orchestration
Setup
# Install Poetry if you don't have it
curl -sSL https://install.python-poetry.org | python3 -
# Install dependencies
poetry install
# Or install from pypi
pip install pdf_mind
# Install other dependencies
brew install ghostscript
brew install poppler
# apt install ghostscript poppler
N.B.: if you're on OSX, the Ghostscript module may not be found. You can fix that by doing:
mkdir -p ~/lib
ln -s "$(brew --prefix gs)/lib/libgs.dylib" ~/lib
See the Camelot docs for more details on installing the dependency. It'll work without Ghostscript.
Usage
from pdf_mind import PDFExtractionAgent
agent = PDFExtractionAgent()
result = agent.process("path/to/document.pdf")
print(result)
Alternatively, look at example.py for an example that will output metadata on extracted items and token usage:
Development
# Run tests
poetry run pytest
# Lint code
poetry run ruff check .
poetry run black .
Metadata
Release files for pdf-mind 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdf_mind-0.1.2.tar.gz | 10.5 kB | Without provenance | Details for pdf_mind-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdf_mind-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pdf_mind-0.1.2-py3-none-any.whl |
Total release size: 24.7 kB
Release files / pdf_mind-0.1.2.tar.gz
| Download URL | pdf_mind-0.1.2.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
165a2a47d8d23805c656c0a19c9ddfe0de3728f190b016f90818c5b6054da225
|
|
BLAKE2b-256 checksum How to use checksums |
745f264ae87e121c287515175c01a5d56902cf78b9793751e04e9273a57a9ce5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.10.16 Linux/6.8.0-1021-azure
|
Release files / pdf_mind-0.1.2-py3-none-any.whl
| Download URL | pdf_mind-0.1.2-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
436d891e7281d17fb3bb9aea37203066ae8fc7c3201f69081ca9b646768771cb
|
|
BLAKE2b-256 checksum How to use checksums |
c27a8a273e97f6e5135c80ec7f9efd0fe3952ea86cfadb36473fddbe5b52f6b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.10.16 Linux/6.8.0-1021-azure
|
Security for pdf-mind 0.1.2
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.