AnyConvert
← All docs

PDF OCR

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.

Request

POST /webhooks/trigger — same endpoint and fields as every tool, with tool="pdf-ocr" set explicitly (it's not the default).

curl
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"

Options

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.

pagesstring, optionalDefault "all"; the page-selection grammar.
modestring, optional"skip-text" (default, leaves pages that already have a trustworthy text layer alone) or "force" (adds a layer anyway).
drawingsstring, optional"auto" (default, recognizes outlined CAD/P&ID text) or "off".
minConfidencenumber, optionalDefault 0.5. Words below it are not written, and the count is reported.
targetCapPxnumber, optionalDefault 30. 20 to 40 — the OCR zoom for outlined drawing pages.
passwordstring, optionalTried only if the empty password fails.

Response

Statistics are returned on success: words written, words below minConfidence, words dropped for lacking ink, and pages by route (scanned, drawing, already had text).

Pricing

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.

Failure reasons

Delivered via the webhook as outcome=failure with a reason below — see the docs index for the full delivery shape.

invalid_optionsA page outside the document.
encrypted_fileThe PDF is password protected and the given password (if any) didn't open it.
no_extractable_textEvery selected page was blank or unreadable by every route — no text layer was added anywhere.
invalid_fileThe file could not be read, or was not the format this tool expects.
render_failedSomething failed during conversion that wasn’t a problem with the input itself.
timeoutThe job did not finish within its time budget.
internal_errorAn unexpected error on our side.
AnyConvert
A simple conversion API for teams that need documents turned into the right format, automatically.
Tools
PDF to WordMerge PDFJPG to PDFSign PDFEdit PDFCompress PDFExtract Text with CoordinatesView all tools →
Product
DocsPricing
Legal
Terms of ServicePrivacy PolicyRefund Policy
Support
support@anyconvert.app
© 2026 AnyConvert. All rights reserved.