Send a PDF; get back the same PDF with an invisible, searchable English text layer added over scanned pages and over pages whose text is outlined into vector shapes (CAD and P&ID exports). The visible page never changes — only what you can select, copy, and search for does.
See the PDF OCR tool page, or the docs index for authentication, the shared request/webhook contract, and the generic error table.
POST /webhooks/trigger — same endpoint and fields as every tool, with tool="pdf-ocr" set explicitly (it's not the default).
curl -X POST https://api.anyconvert.app/webhooks/trigger \ -H "x-api-key: your_api_key_here" \ -F "file=@scan.pdf" \ -F "fileId=document-001" \ -F "referenceId=reference-001" \ -F "tool=pdf-ocr"
An optional options multipart field carrying a JSON object, validated synchronously before a credit is charged — a bad value is rejected with 400, not charged and not queued. A hidden word is only ever written where there is real ink behind it — a recognized word with nothing under it is dropped, not reported as text.
| pages | string, optional | Default "all"; the page-selection grammar. |
| mode | string, optional | "skip-text" (default, leaves pages that already have a trustworthy text layer alone) or "force" (adds a layer anyway). |
| drawings | string, optional | "auto" (default, recognizes outlined CAD/P&ID text) or "off". |
| minConfidence | number, optional | Default 0.5. Words below it are not written, and the count is reported. |
| targetCapPx | number, optional | Default 30. 20 to 40 — the OCR zoom for outlined drawing pages. |
| password | string, optional | Tried only if the empty password fails. |
Statistics are returned on success: words written, words below minConfidence, words dropped for lacking ink, and pages by route (scanned, drawing, already had text).
Billed per page, not per document — 1 credit for every 5 pages, rounded up. This is our most compute-intensive tool, which is reflected in the rate.
Delivered via the webhook as outcome=failure with a reason below — see the docs index for the full delivery shape.
| invalid_options | A page outside the document. |
| encrypted_file | The PDF is password protected and the given password (if any) didn't open it. |
| no_extractable_text | Every selected page was blank or unreadable by every route — no text layer was added anywhere. |
| invalid_file | The file could not be read, or was not the format this tool expects. |
| render_failed | Something failed during conversion that wasn’t a problem with the input itself. |
| timeout | The job did not finish within its time budget. |
| internal_error | An unexpected error on our side. |