What's wrong with this entry?
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."
- The check runs inside the
pdftoppm-based PDF-to-image renderer (externalpoppler-utilstool; 120 s timeout, max file size 100 MB) - Triggered when
pdftoppmexits non-zero and its stderr matches/Wrong page range given.*last page \((\d+)\)/iwith a captured page count of exactly0 - The error
reasonfield 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
pdftoppmis invoked: path must be a regular file, size > 0, size ≤ 100 MB, andpdftoppmavailability is verified via a cached-vprobe (5 s timeout); if any precondition fails, a different error reason is returned without reaching this check
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.