Pagespool for OCRmyPDF

v1.0.3
com.pagespool/ocrmypdf Checked 1 day ago Published 1 day ago

Hosted 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…

ParameterTypeDescription
filename *stringThe file name with its extension: .pdf, .png, .jpg or .jpeg.
content_base64The file content, base64-encoded. Up to 4 MB before encoding.
deskewbooleanStraighten crooked pages. Not with mode=redo.
fileobjectThe file as a download link, instead of `content_base64`: set `download_url` to a public https URL of the file.
languagestringThe document's language: eng, deu, spa or fra.
modestringPages that already have text: skip them (the default), redo an earlier OCR layer, or force OCR on every page as an image.
output_typestringpdfa (PDF/A-2b, the default) or pdf.
rotate_pagesbooleanTurn 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.

ParameterTypeDescription
job_id *stringThe `job_id` returned by `ocr_pdf`.