[BUG] Unable to read PDF with claude code
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.
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.
+1 , I was thinking I am doing something wrong.
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.
same issue here
just came across this issue today
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?
Same Issue! Any guidance / support / work-arounds?
I installed PyPDF2 via pip & now CC is reading the pdf files.
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..."
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
+1
+1 this would be a great feature especially for commercial sdk's that only provide pdf documentation.
+1 — would be helpful for referencing images and handwritten markup in PDFs.
This is shipped in 1.0.58
Same issue here with PDF and with xlsx
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.