The AI Loadout

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

  1. Install poppler (brew install poppler on Mac)
  2. Put the files in ./pdfs
  3. Ask: "Run pdftotext -layout on each file in pdfs/, then summarize each in 5 bullets with page numbers."

Codex

  1. Same setup
  2. codex exec "convert pdfs/*.pdf with pdftotext and write summaries to summaries.md"

Cursor

  1. Same setup
  2. Ask the agent to run pdftotext and write a summary file you can check

Grok Bot

  1. Send the PDF to Grok Bot
  2. It 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

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

Want tested skills and personas installed in one command? See the AI Loadout packs, from $9.