Can Claude Code Read PDFs?

Updated October 28, 2026. Yes. Claude Code reads short PDF files whole. For PDFs longer than 10 pages it reads page ranges, up to 20 pages at a time, with a pages parameter. Page-range reads need pdftoppm from poppler-utils installed and on your PATH.

Claude Code can read PDF files, but long documents work differently from short ones. The Read tool reads a short PDF whole. For a long PDF, it reads page ranges so the model does not receive the entire document at once.

Short PDFs compared with long PDFs

A short .pdf file is read in one call. A PDF longer than 10 pages is read in ranges with a pages parameter, for example "1-5", and each read returns up to 20 pages at a time.

This range behavior is useful for large specs, contracts, and research papers. Ask for the section you need instead of the whole file, and the context stays smaller and more focused.

Install poppler for page-range reads

Page-range reads render pages with pdftoppm from poppler-utils. Install poppler before you read a long PDF:

# macOS
brew install poppler

# Debian and Ubuntu
apt-get install poppler-utils

On Windows and other platforms, install a poppler build that puts pdftoppm on your PATH. Without it, a page-range read fails with the message pdftoppm is not installed.

Check the install from the same shell Claude Code uses:

pdftoppm -v

If the command is not found, reopen the terminal or add the poppler bin directory to PATH. The command not found guide explains the PATH steps for zsh, bash, and Windows shells.

How to read a PDF in Claude Code

Reference the file in your prompt and name the pages you need:

Read pages 1-5 of @docs/api-spec.pdf and list the required request headers.

Then narrow the request. Ask Claude to quote the exact clause, table row, or figure caption you need to verify. A page range plus a specific question gives a more reliable answer than a request to summarize the whole document.

Limits and failure modes

PDF support is for reading, not editing. Claude can summarize a document, pull requirements, or compare two versions, but it cannot rewrite the PDF file itself without another tool.

If you only need to look at a screenshot or diagram, see can Claude Code read images. For Windows setup, see Claude Code on Windows.

Related reading: Claude Code tips for absolute beginners: files, context, and prompts

Built by Michael Lip, solo dev in Warsaw.