How to Extract PDF Content into Markdown Notes with an Agent
The naive way to get a PDF into your notes is to paste the whole thing into a chat window and hope the model keeps its footing — burning context on page headers and boilerplate, and losing every page number in the process.
The better way: give the agent tools instead of tokens. Connected to Apdf over MCP, it pulls exactly the text it needs — structured, page by page — and writes the note your vault actually wants, with citations that survive.
Connect the agent to Apdf
One OAuth endpoint covers Claude Desktop, Claude Code, Cursor — anything that speaks MCP:
claude mcp add --transport http apdf https://apdf.io/mcp/main
Ask for the note, not the text
https://files.northlight.example/research/benchmark-report.pdf
The read-pdf-content tool is what keeps the note
honest — text arrives already segmented by page, so citations come free:
{
"pages_total": 8,
"characters_total": 934,
"pages": [
{
"page": 1,
"characters": 128,
"content": "2026 Client Reporting Benchmark\nHow 400 agencies deliver, and what clients actually read.\n\nPage 1 of 8 - Northlight Consulting\n\n"
},
{
"page": 3,
"characters": 109,
"content": "Key Findings\nReport length is up 31%. Client reading time is down 47%.\n\nPage 3 of 8 - Northlight Consulting\n\n"
}
]
}
(Two of the eight page objects shown.) And the note the agent writes from it:
---
source: 2026 Client Reporting Benchmark (PDF, 8 pages)
captured: 2026-07-23
tags: [reporting, benchmarks, agencies]
---
# 2026 Client Reporting Benchmark
> How 400 agencies deliver, and what clients actually read.
**Key stat:** report length is up 31% while client reading time
is down 47% (p. 3).
## Section map
- Executive Summary — five findings on packaging monthly reports (p. 2)
- Benchmarks by Agency Size — cadence, format, tooling (p. 4)
- Case Study: Halstrom & Co — 40-page decks → 6-page narratives,
doubled replies (p. 5)
- Methodology (p. 6) · Recommendations (p. 7)
Pull quotes without re-reading
Weeks later, you need the exact line for a citation — no need to re-extract
the document. search-pdf-content finds it with its
position:
{
"search_text": "reading time",
"results_total": 1,
"results_pages": 1,
"results": [
{
"page": "3",
"matched_line": "Report length is up 31%. Client reading time is down 47%.",
"exact_word": "reading time"
}
]
}
read-pdf-content-with-ocr and
search-pdf-content-with-ocr — same shapes, OCR pass included.
The OCR tutorial
walks through it.
Where to go from here
The same connection carries every PDF operation — and the engagement layer behind them.
Related tutorials
Extract PDF Text for RAG Pipelines & LLMs with Python
This tutorial explains how to extract clean text from PDFs for RAG pipelines using the Apdf API in Python. It demonstrates replacing messy local libraries with an API that returns structured JSON, allowing developers to easily feed high-quality document data into OpenAI or vector databases.
Search a PDF From Your Editor
The integration spec is a PDF and your questions arrive mid-function. With the editor connected over MCP, 'what's the retry policy?' comes back with the exact line and page — and a regex search turns 'list every error code' into one call with three cited matches.
Watermark Draft PDFs via Claude Before Sharing
The draft that leaks is the one you didn't stamp. Conversationally it's one message: the agent designs the translucent DRAFT — CONFIDENTIAL stamp itself with the PDF generator, overlays it across every page, renders a page to prove it looks right — and mints one named copy per reviewer.
Your code made the PDF.
Then it went dark.
Opened, read, re-read, dropped on page 4 — you never see any of it. Share the PDFs you generate through Apdf recipient links, and every signal becomes something you can act on: ping Slack, update the CRM, let an agent follow up. Same account, same API token, one more call.
API · Webhook · MCP