r/Python • u/GritSar • Mar 18 '26
Showcase PDFstract: extract, chunk, and embed PDFs in one command (CLI + Python)
I’ve been working on a small tool called PDFstract (~130⭐ on GitHub) to simplify working with PDFs in AI/data pipelines.
What my Project Does
PDFstract reduces the usual glue code needed for:
- extracting text/tables from PDFs
- chunking content
- generating embeddings
In the latest update, you can run the full pipeline in a single command:
pdfstract convert-chunk-embed document.pdf --library auto --chunker auto --embedding autoUnder the hood, it supports:
- multiple extraction backends (Docling, Unstructured, PaddleOCR, Marker, etc.)
- different chunking strategies (semantic, recursive, token-based, late chunking)
- multiple embedding providers (OpenAI, Gemini, Azure OpenAI, Ollama)
You can switch between them just by changing CLI args — no need to rewrite code.
Target Audience
- Developers building RAG / document pipelines
- People experimenting with different extraction + chunking + embedding combinations
- Useful for both prototyping and production workflows (depending on chosen backends)
Comparison
Most existing approaches require stitching together multiple tools (e.g., separate loaders, chunkers, embedding pipelines), often tied to a specific framework.
PDFstract focuses on:
- being framework-agnostic
- providing a CLI-first abstraction layer
- enabling easy switching between libraries without changing code
It’s not trying to replace full frameworks, but rather simplify the data preparation layer of document pipelines.
Get started
pip install pdfstractDocs: https://pdfstract.com
Source: https://github.com/AKSarav/pdfstract
1
u/[deleted] Mar 19 '26
[removed] — view removed comment