Files
CatoandClaude Opus 5.5 58cb5c691f feat(pdf): read a PDF someone attaches, as text or as pictures of its pages (0.20.0) (#46)
* feat(pdf): read a PDF someone attaches, as text or as pictures of its pages

No model on a free chain reads a PDF file, so a PDF never leaves the device
as one. @bitbaum/chatkit/pdf reads it in the browser with pdf.js:

- a PDF with a text layer comes back as text, page markers kept;
- one without (slides exported as pictures, a scan) comes back as its pages,
  four to a sheet at 784px a page, for a model that can see.

chatkit-copy-pdf-assets copies pdf.js's worker and decoders into the app's
static folder; readPdf takes their URL. Without the decoders, JPEG 2000
pages (macOS's "reduce file size" export) draw blank. The legacy build is
used so older iPhones read PDFs too; pdf.js loads only on the first PDF.

Found on OrangeCat 2026-10-27: a 17-slide investor deck (no text layer,
JPEG 2000 images) could not be shared with the Cat at all. Checked in
Chromium against that deck: 5 sheets, every slide legible.

Release 0.20.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmt7KKvAA6LzcgFqXA3

* docs(pdf): describe the app's static folder without naming it as a chatkit path; chain the copy into build (pnpm skips prebuild)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmt7KKvAA6LzcgFqXA3

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 17:00:54 +01:00
..