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 links, events and signatures 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.
How to Convert Word and PowerPoint Files to PDF by Asking Claude
Paste the links, get PDFs back. Connect Claude to Apdf over MCP and convert decks and documents conversationally — then let the agent store the PDF as a tracked document and mint a personal link for the client.
Extract the Answers from Filled PDF Forms with an AI Agent
Fillable PDFs already store every answer in a named field — no zones to draw, no parser to train. Hand an agent connected to Apdf a stack of returned applications and it reads each form's fields into one CSV, flags the applicant who skipped a required answer, and catches the copy that came back flattened.
Your code made the PDF.
Then it went dark.
Opened, read, signed or ignored — you never see any of it. Send the PDFs you generate as personal links, and every open, page read, comment and signature comes back to your software as a webhook. Need it signed? Same link. Same account, same API key, one more call.
API · Webhook · MCP