cd /news/ai-tools/turn-pdfs-into-clean-markdown-chunks… · home › topics › ai-tools › article
[ARTICLE · art-148248] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Turn PDFs into clean Markdown chunks for your RAG pipeline (without writing a parser)

A developer built an Apify actor that converts PDFs into clean, chunked Markdown for RAG pipelines without requiring custom parsing code, handling headers, footers, and mid-sentence line breaks automatically. A test batch of 5 PDFs totaling 131 pages and roughly 78,000 words was processed in about 4 seconds at $0.003 per PDF, with image-only scanned PDFs detected and skipped at no charge. The tool is also exposed as an agent tool via the Apify MCP server so assistants like Claude or ChatGPT can read PDFs on demand.

by read1 min views4 publishedOct 9, 2026

PDF parsing is the boring part of every RAG project. Line breaks in the middle of sentences, lost headings, headers and footers mixed into the text, no page numbers to cite. You can spend days tuning pypdf or pdfplumber, or you can skip that part.

Here's a setup-free way to get LLM-ready text from PDFs, including PDFs you haven't found yet.

from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("digitalni.produkty.pro.zivot/pdf-text-extractor").call(
    run_input={
        "urls": ["https://arxiv.org/pdf/1706.03762"],
        "includeMarkdown": True,
        "chunkSize": 1000,
        "chunkOverlap": 100,
    }
)
for pdf in client.dataset(run["defaultDatasetId"]).iterate_items():
    for chunk in pdf.get("chunks", []):
        ...  # embed and upsert into your vector DB

It also works as a tool for AI agents through the Apify MCP server, so Claude or ChatGPT can read PDFs on demand.

A test batch of 5 PDFs with 131 pages and ~78k words was processed in about 4 seconds. Price: $0.003 per PDF, any number of pages. Scanned (image-only) PDFs are detected and skipped, and you are not charged for them.

Disclosure: I built this tool. Feature requests welcome in the Issues tab.

── more in #ai-tools 4 stories · sorted by recency
── more on @apify 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/turn-pdfs-into-clean…] indexed:0 read:1min 2026-10-09 · —