Skip to content

docs: finish the EmptyPdf wording sweep - #113

Merged
0xMassi merged 1 commit into
mainfrom
docs/finish-emptypdf-sweep
Aug 16, 2026
Merged

docs: finish the EmptyPdf wording sweep#113
0xMassi merged 1 commit into
mainfrom
docs/finish-emptypdf-sweep

Conversation

@0xMassi

@0xMassi 0xMassi commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Completes the wording fix started in #111 (issue #106).

#106 was about a claim, not a comment. "Auto mode catches scanned PDFs" appeared in five places. #111 fixed two and closed the issue. This clears the other three.

The one that matters most is PdfModeArg::Auto, because clap renders that doc comment in webclaw --help:

  --pdf-mode <PDF_MODE>
      Possible values:
      - auto: Error if the PDF yields no non-whitespace text   ← was "(catches scanned PDFs)"

Why the claim is worth chasing down

EmptyPdf fires only when the normalized text has zero non-whitespace characters. A scanned page carrying a page number or a footer stamp returns Ok with unusable text. An outside contributor built #104 and #105 on exactly this wording, which is what #106's "Why it matters" section was about.

Changed

  • crates/webclaw-pdf/src/lib.rsPdfMode::Auto variant doc
  • crates/webclaw-cli/src/main.rsPdfModeArg::Auto variant doc (the --help one)
  • examples/README.md — the --pdf-mode auto example comment

Behaviour untouched; every changed line is a comment.

Verified: grep for catches scanned / scanned/image-only / Scanned PDFs return across the repo now returns nothing.

Why this change was needed:
#106 was about a claim, not a comment. The repo said in five places that
Auto mode "catches scanned PDFs". #111 corrected two of them, and closed
the issue. The remaining three included the most user-visible copy: the
PdfModeArg::Auto variant doc, which clap renders in `webclaw --help` under
Possible values.

The claim is wrong in a way that has already cost us. EmptyPdf fires only
when the normalized text has zero non-whitespace characters, so a scanned
page carrying a page number or footer stamp returns Ok with unusable text.
An outside contributor built #104/#105 on the wording this sweep removes.

What changed:
- crates/webclaw-pdf/src/lib.rs: the PdfMode::Auto variant doc.
- crates/webclaw-cli/src/main.rs: the PdfModeArg::Auto variant doc, which is
  the one that reaches users through --help.
- examples/README.md: the --pdf-mode auto example comment.

Verified: grep for "catches scanned" / "scanned/image-only" / "Scanned PDFs
return" across the repo now returns nothing, and `webclaw --help` prints
"- auto: Error if the PDF yields no non-whitespace text".

Problem solved:
No surface still tells a reader that Auto detects scanned documents.
Behaviour is untouched; every changed line is a comment.

Refs: #106
@0xMassi
0xMassi merged commit 623fc04 into main Aug 16, 2026
4 checks passed
@0xMassi
0xMassi deleted the docs/finish-emptypdf-sweep branch August 16, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant