Pagespool for OCRmyPDF
v1.0.3Hosted OCRmyPDF: add a searchable text layer to scanned PDFs and images, returned as PDF/A.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ocr_pdf OCR a scanned PDF or image
Queue a scanned PDF, PNG or JPEG for OCR with OCRmyPDF and Tesseract. The result is the same document with a searchable text layer, as PDF/A by default. Pass the file as base64 in `content_base64` (up to 4 MB) or as a download link in `file` (up to 25 MB), and its name in `filename`. Up to 200 pages; an image is one page. Returns `job_id`, `status`, `pages` and `credits`. The job runs in the background and is stopped after 15 minutes: `get_ocr_result` returns its state for the `job_id`, and the result once `status` is `succeeded`. Requires an account (an API key or sign-in). Costs 2 credits…
| Parameter | Type | Description |
|---|---|---|
filename * | string | The file name with its extension: .pdf, .png, .jpg or .jpeg. |
content_base64 | The file content, base64-encoded. Up to 4 MB before encoding. | |
deskew | boolean | Straighten crooked pages. Not with mode=redo. |
file | object | The file as a download link, instead of `content_base64`: set `download_url` to a public https URL of the file. |
language | string | The document's language: eng, deu, spa or fra. |
mode | string | Pages that already have text: skip them (the default), redo an earlier OCR layer, or force OCR on every page as an image. |
output_type | string | pdfa (PDF/A-2b, the default) or pdf. |
rotate_pages | boolean | Turn pages that are upside down or sideways. |
get_ocr_result Check an OCR job
Check an OCR job you queued with `ocr_pdf`. Returns `job_id` and `status` (`queued`, `running`, `succeeded` or `failed`). A succeeded job includes `download_url`, a link the user can open to get the searchable PDF; it works for 60 minutes without an API key. A failed job includes `error` (one sentence) and `code`. Results are deleted 7 days after submission. Requires an account (an API key or sign-in). Credits: free. This tool is not metered.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The `job_id` returned by `ocr_pdf`. |