Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.202 ·

PDF Empty Page Tree Detection

Entry
JSON All of v2.1.202
EntryKind: in v2.1.202,
ImprovementsSection of the release

When a PDF attachment reports 0 pages (malformed or empty page tree), Claude Code now emits a specific diagnostic: "PDF reports 0 pages (empty page tree). The PDF may be invalid."

Details
  • The check runs inside the pdftoppm-based PDF-to-image renderer (external poppler-utils tool; 120 s timeout, max file size 100 MB)
  • Triggered when pdftoppm exits non-zero and its stderr matches /Wrong page range given.*last page \((\d+)\)/i with a captured page count of exactly 0
  • The error reason field is "corrupted" — the same category used for structurally damaged PDFs; the distinct message distinguishes an empty page tree from the generic "PDF file is corrupted or invalid." error
  • This check lives inside a cascaded error-classification block that also handles: password_protected (stderr contains "password"), page_out_of_range (same regex but captured count > 0), xref/trailer syntax errors (Syntax Error: Couldn't find trailer dictionary / read xref table), and a generic stderr pass-through fallback
  • Pre-conditions enforced before pdftoppm is invoked: path must be a regular file, size > 0, size ≤ 100 MB, and pdftoppm availability is verified via a cached -v probe (5 s timeout); if any precondition fails, a different error reason is returned without reaching this check
Evidence

PDF validation (search for "PDF reports 0 pages" and "Wrong page range given" inside NGo())

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.202 →

Feedback