ocr_pdf
OCR a PDF by rasterizing pages and applying an OCR engine per page. Supports configurable engine, language, page ranges, and DPI for accurate text extraction.
Instructions
OCR a PDF by rasterizing pages (PyMuPDF) then running an engine per page.
Args: path: absolute path to the PDF. engine/lang: see ocr_image. pages: 'all' or a range like '1-3,5'. dpi: rasterization DPI (default 300; higher = slower, more accurate).
Returns JSON: {page_count, pages:[{page, ...ocr_image result...}], full_text}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| engine | No | auto | |
| lang | No | en | |
| pages | No | all | |
| dpi | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |