ocr_book
OCR scanned PDFs lacking a text layer using a cloud provider, then index the text for full-text search. Optionally generate and attach a re-typeset EPUB to the book's record.
Instructions
OCR a scanned PDF via the configured cloud provider and index the text.
Detection → page rendering → provider transcription → cache → full-text index → (by default) pandoc re-typeset EPUB attached to the book's existing record. Books with a usable text layer are left untouched.
Configuration: CALIBRE_OCR_PROVIDER (default "anthropic"), CALIBRE_OCR_API_KEY, CALIBRE_OCR_MODEL, CALIBRE_OCR_BASE_URL, CALIBRE_OCR_MAX_PAGES.
Args: book_id: Book whose PDF format should be OCR'd. typeset: Also build a re-typeset EPUB with pandoc (default True). import_format: Attach the EPUB to the book record (default True).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| book_id | Yes | ||
| typeset | No | ||
| import_format | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||