pdf_extract_text
Extracts text from PDFs or selected page ranges; uses OCR for pages without a text layer and supports paged output via offset for long documents.
Instructions
Extract text from a PDF, or from some pages ("2-5"). Pages with no text layer are read with OCR when it is installed. Long text comes in parts: pass next_offset as offset to continue.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | ||
| offset | No | ||
| max_chars | No | ||
| input_path | Yes | ||
| ocr_fallback | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| text | Yes | ||
| pages | Yes | ||
| method | Yes | text_layer, ocr, no_text_found or ocr_unavailable. | |
| offset | Yes | ||
| next_offset | Yes | Pass as offset to read the next part. None at the end. | |
| total_chars | Yes | ||
| returned_chars | Yes |