claude-code - 💡(How to fix) Fix [BUG] "PDF too large" error incorrectly triggered on plain text (.txt) files in VS Code extension [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#57899Fetched 2026-05-11 03:22:31
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Error Message

The error message "PDF too large (max 100 pages, 20MB). Try reading the file a different way (e.g., extract text with pdftotext)" is being incorrectly triggered when uploading or referencing plain text files. The file in question was a .txt file converted from a PDF using pdftotext, not a PDF itself.

Error Messages/Logs

Also attempted referencing the file by absolute path in the prompt — same error Also attempted renaming to adc_burst.txt and re-uploading — same error

Code Example

PDF too large (max 100 pages, 20MB). Try reading the file a different way (e.g., extract text with pdftotext).
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The error message "PDF too large (max 100 pages, 20MB). Try reading the file a different way (e.g., extract text with pdftotext)" is being incorrectly triggered when uploading or referencing plain text files. The file in question was a .txt file converted from a PDF using pdftotext, not a PDF itself.

What Should Happen?

It should read the txt file uploaded and extract data

Error Messages/Logs

PDF too large (max 100 pages, 20MB). Try reading the file a different way (e.g., extract text with pdftotext).

Steps to Reproduce

Take a PDF datasheet and extract a section using pdftk:

pdftk input.pdf cat 405-419 output extract.pdf

Convert to text using pdftotext:

pdftotext extract.pdf extract.txt

Upload extract.txt to Claude Code in VS Code and submit a prompt referencing it Also attempted referencing the file by absolute path in the prompt — same error Also attempted renaming to adc_burst.txt and re-uploading — same error

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.138

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] "PDF too large" error incorrectly triggered on plain text (.txt) files in VS Code extension [1 participants]