How to summarize PDFs with an AI agent
Put the PDFs in your project folder, have the agent convert them to text with pdftotext from poppler, then ask for a summary that quotes page numbers. This works the same in Claude Code, Codex and Cursor. For scanned PDFs, you need OCR first, because they contain images, not text.
Checked against official docs on Oct 26, 2026.
Get the free starter kit. One short email a day when our setups change.
Free starter kit on signup: 2 Claude Code skills and 1 agent persona from our paid packs. By subscribing you agree to get The AI Loadout Daily, one email each morning. No spam, we never sell your email, and every email has a one-click unsubscribe link.
Claude Code
Install poppler (brew install poppler on Mac)Put the files in ./pdfsAsk: "Run pdftotext -layout on each file in pdfs/, then summarize each in 5 bullets with page numbers."
Codex
Same setupcodex exec "convert pdfs/*.pdf with pdftotext and write summaries to summaries.md"
Cursor
Same setupAsk the agent to run pdftotext and write a summary file you can check
Grok Bot
Send the PDF to Grok BotIt reads it on its computer and returns a summary or a document
Gotchas
- Ask for page numbers so you can check claims.
- Long PDFs can exceed the context window. Summarize in chunks.
- Contracts and medical records may be confidential. Check who can see them.
The loadout for this job
- Tools: Claude, ChatGPT
- Repo: Anthropic Agent Skills
- Model: Gemini 4 Argon
- Bot: Grok Bot
- Full setup: Best AI for summarizing PDFs and long documents
FAQ
What is the best way to summarize a PDF with AI?
Extract the text, then ask for a structured summary with page references.
Why does my agent say the PDF is empty?
It is probably a scan. Run OCR first.
Related how-tos
Sources
Commands change. Check the linked docs before you run anything. All how-to guides