[BUG] Unable to read PDF with claude code

Resolved 💬 16 comments Opened Jun 2, 2025 by tristanbes Closed Jul 24, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [x] Anthropic API
  • Claude CLI version: 1.0.7
  • Operating System: MacOS

Bug Description

When referencing a .pdf file, like "based on the @path-to-pdf" it gives:

Fetch(file:///Users/t.b.../workspace/..../full-reference-en-US-113718.pdf)
  ⎿  Error: Invalid URL

⏺ Read(afull-reference-en-US-113718.pdf)…
  ⎿  Error: This tool cannot read binary files. The file appears to be a binary .pdf file. Please
     use appropriate tools for binary file analysis.

View original on GitHub ↗

16 Comments

benbonnet · 1 year ago

same here

``Error: This tool cannot read binary files. The file appears to be a binary .pdf file. Please use appropriate tools for binary file analysis.  API Error: Connection error.``

irtiza · 1 year ago

+1 , I was thinking I am doing something wrong.

edwrdcrpio · 1 year ago

<img width="648" alt="Image" src="https://github.com/user-attachments/assets/8e5c613b-7310-4454-87fe-48d7a73701ee" />

Same here. Claude Code did mark it as done, but I had to confirm the actual status and Claude Code did tick off the box as complete but did not read the file.

Designedforusers · 1 year ago

same issue here

mchulet · 1 year ago

just came across this issue today

EduardoNeville · 1 year ago

I have the same issue here. It decided to use pdftotext as a way of translating. Not very helpful since it was filled with equations. Has anyone else had a similar experience?

Misty1334 · 1 year ago

Same Issue! Any guidance / support / work-arounds?

Misty1334 · 1 year ago

I installed PyPDF2 via pip & now CC is reading the pdf files.

cptkoolbeenz · 1 year ago
I installed PyPDF2 via pip & now CC is reading the pdf files.

~~I installed PyPDF2 in a venv, set the venv, and started Claude. No change. How did you do it?~~
Nevermind, I had to tell Claud to use the tool. "Use PyPDF2 to open..."

isCopyman · 1 year ago

What is the function of pypdf2? Does it convert PDF to text? I think claude code should have the ability to directly use multi-modal reading of PDFs like gemini

jw408 · 1 year ago

+1

tjdcs · 1 year ago

+1 this would be a great feature especially for commercial sdk's that only provide pdf documentation.

lukeburns · 1 year ago

+1 — would be helpful for referencing images and handwritten markup in PDFs.

bcherny collaborator · 11 months ago

This is shipped in 1.0.58

allisonault · 11 months ago

Same issue here with PDF and with xlsx

github-actions[bot] · 11 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.