# Text recognition (OCR)

> Make scanned DjVu pages searchable with on-device text recognition.

Source: https://niraqua.com/djvu/help/text-recognition/

When a document has no embedded text, Niraqua DjVu can recognize the text on its
pages (OCR) so you can search and select it.

*Using an iPhone or iPad? See [On iPhone and iPad](https://niraqua.com/djvu/help/ios/).*

## When to use it

A DjVu page can display readable words without containing searchable text. Search needs embedded text or an OCR result. No matches can also mean recognition errors, a different spelling, or an incomplete text layer.

[Search DjVu files and recognize scanned text](https://niraqua.com/djvu/search-djvu/)

## Run recognition

1. Choose **View > Text Recognition...** or press
   `⌘` `⇧` `T`.
2. Pick the language of the document. Recognition handles one language at a time,
   so choose the one that matches most of the text.
3. Choose a quality: **Fast** suits most documents, **Accurate** takes longer
   and can read difficult scans better.
4. Leave **Remember for this document** turned on to reuse the same language and
   quality the next time you recognize this document.
5. Confirm to start. Progress is shown while the pages are processed, along with
   a rough estimate of how long the run will take.

## Languages

Recognition covers 15 languages: English, French, German, Spanish, Italian,
Portuguese, Russian, Ukrainian, Polish, Dutch, Turkish, Chinese (Simplified),
Chinese (Traditional), Japanese, and Korean.

**Fast** is available for English, French, German, Spanish, Italian, and
Portuguese. For the other nine languages the app recognizes at **Accurate**
quality even if you pick Fast - Fast cannot read them - and the sheet says so
when you choose one. That run takes longer, but it produces text rather than
nothing.

## How it works

- Recognition runs entirely on your Mac using Apple's built-in frameworks. The
  contents of your pages are never sent over the network.
- Recognized text is cached and reused when available. You can run recognition again to change the language or quality, or to replace an incorrect result.
- To recognize again with a different language or quality - for example after
  picking the wrong language - open the sheet again and choose **Re-run**.
- On a re-run, **Replace existing text layer** decides what happens to the text
  you already have: turned on, the document's recognized text is cleared and
  every page is read again; turned off, only the pages with no text yet are
  recognized. Changing the language or quality turns it on for you, since the
  old text came from different settings.

## Stop recognition

To stop a run in progress, choose **View > Stop Text Recognition**, or click
**Cancel** in the **Recognizing Text** banner above the page. Pages that were
already recognized stay searchable.

## After recognition

Once recognition finishes, [search and text selection](https://niraqua.com/djvu/help/searching/) work
just as they do for documents that already contain text. To bake the recognized
text into a shareable file, [export to PDF](https://niraqua.com/djvu/help/exporting/) with **Enable OCR**
turned on.
