pdf_check_text
Check whether a PDF has a text layer, looks scanned, or needs OCR before extracting text. Returns a verdict and per-page evidence.
Instructions
Check whether a PDF has a text layer, looks scanned, or needs OCR.
Answers "can I read this, or is it a picture of a document?". Worth running before extracting text from a file you have not seen.
verdict is "text", "scanned", "mixed", or "no_text" — the last meaning
nothing readable but nothing scan-like either, so blank, vector-only, or
illustrated pages that OCR cannot help. needs_ocr follows from it, summary
is a sentence worth quoting, and the per page evidence behind the verdict
comes back alongside, including each page's image_coverage (the largest
image's share of the page area).
Samples up to 10 pages spread across the document, so a true sampled means
the answer is an estimate for the pages in between. It does not return the
text (use pdf_extract_text) and it does not run OCR.
Args: ref: PDF file path, or a workspace artifact id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |