v2.4 CURRENT PROTOCOLOCR

OCR for Scanned Documents

PDF Editor examines every page of an uploaded document separately. Pages with a text layer are read directly; pages without one, or made of an image only, go through OCR. In mixed documents (for example a scanned signature page appended to a digital contract) only the scanned pages are billed: $0.01 per page.

Supported Languages

Pass the languages at upload time in the ocr_languages field as ISO 639-2 codes. If you leave them out, the engine guesses the language from the first page, but naming the language explicitly clearly improves accuracy, especially for Turkish characters (ı, ş, ğ).

CodeLanguageNote
turTurkishLatin alphabet, post-1928 script
engEnglishDefault fallback language
deuGerman
fraFrench
araArabicRight-to-left layout is supported
rusRussianCyrillic alphabet

You can give a document at most three languages. For bilingual contracts ["tur", "eng"] is the most common choice; adding languages you do not need slows processing down and raises the risk of mix-ups.

Forcing OCR

Some digital PDFs have a broken text layer: copying from them yields garbage characters. In that case ocr: "force" ignores the text layer and runs every page through OCR.

curl -X POST https://api.incapon.com/v2.4/pdf/documents \
  -H "Authorization: Bearer $INCAPON_API_KEY" \
  -F file=@old-archive.pdf \
  -F ocr=force \
  -F ocr_languages=tur

The ocr field takes three values: auto (the default), force and off. With off, scanned pages are marked with empty text and not billed.

Tips for Scan Quality

1. Aim for 300 DPI

For normal text, 300 DPI is the best balance of accuracy and size. Scans below 200 DPI misread small print and footnotes; 600 DPI makes the file bigger but rarely improves accuracy.

2. Use Greyscale

Black-and-white (1-bit) scanning can wipe out faint ink and stamps. A greyscale scan leaves more information for the engine's own thresholding step.

3. Scan Flat and Straight

The engine corrects skew of up to 15 degrees automatically. Pages skewed further and phone photos taken at an angle lower the confidence score.

4. Read the Confidence Score

Route pages whose ocr_confidence in the JSON output drops below 0.85 to human review. Redaction rules can miss matches in low-confidence text.

Check OCR quality before redacting.

A misread Turkish ID number (the letter O instead of the digit 0, say) does not match the regex rule and stays unredacted. For sensitive documents, rescan low-confidence pages.

Next Steps & Guides

Was this guide helpful?

Your feedback helps us improve our documentation.