Rayo PDF GORayo PDF GO
Glossary

OCR: what it is and what it is for

What is OCR? Learn how it turns a scan into selectable text, what image quality it needs, and how to get better results from your PDFs.

4 min read6 sectionsUpdated 2026-10-16

In 30 seconds

  • OCR stands for optical character recognition: it reads an image of text and turns it into real text.
  • A scanned PDF without OCR is just an image; with OCR you can search, select, and copy it.
  • It works best with printed text, a straight page, good contrast, and a resolution of about 300 DPI.
  • It is never perfect: check numbers, proper names, and symbols before using the result.

1What is OCR and what is it used for?

OCR stands for optical character recognition. It is the technology that analyzes an image containing text, such as a scan, a photo of a document, or a screenshot, and recognizes the letters so it can deliver them as real text. To a person, a photo of an invoice contains text; to a computer, without OCR, it contains only pixels.

Its usefulness is practical: searching for a word across hundreds of scanned pages, copying a paragraph without retyping it, indexing historical archives, making content easier to read with screen readers, and reusing content that only existed on paper. It is the piece that turns a dead file into a document you can work with.

2How does OCR work under the hood?

The process usually has three steps. First the image is prepared: the page is straightened, noise is cleaned up, contrast is adjusted, and the image is converted to black and white. Then the layout is analyzed to identify where the columns, paragraphs, lines, and words are. Finally, each character is recognized by comparing its shape with models learned from many typefaces.

Modern engines do not look at each letter in isolation: they use the context of the word and the language to choose between similar candidates, such as the lowercase "l", the uppercase "I", and the number one. That is why it is important to select the correct language of the document. Engines such as Tesseract, which is open source, are a well-known example of this approach.

3What is a PDF with a text layer after OCR?

When OCR is applied to a scanned PDF, the usual result does not replace the image: it keeps it visible and places the recognized text as an invisible layer right on top of each word. The document looks identical to the original, but you can now search, select, and copy it.

This has a useful side and a caveat. The useful side is that you keep the faithful look of the original document, with stamps, signatures, and letterheads. The caveat is that if recognition failed on a word, the error stays in the text layer and is not noticeable at a glance because the image looks perfect. A search may fail on exactly that word.

4What determines OCR accuracy?

Input quality rules. A straight, sharp scan with good contrast and a resolution of about 300 dots per inch usually gives excellent results with printed text. Photos taken with a phone work well if the light is even, with no shadows or glare and the page lying flat.

The difficult cases are well known: handwriting, ornamental fonts, very small text, copies of copies, backgrounds with pictures, and pages that are crooked or curved by the spine of a book. Tables with lines also complicate the job, since the lines are sometimes read as characters, as do mixed languages on the same page.

  • Scan at 300 DPI in black and white or grayscale for printed text.
  • Straighten the page and crop black borders before running recognition.
  • Avoid shadows, glare, and direct flash when taking photos.
  • Select the correct language so context can help the engine.

5OCR vs. extracting text from a native PDF

Not every PDF needs OCR. A native PDF, created from a program like Word or from a website, already contains real text, and extracting it is instant and exact because there is nothing to interpret. OCR is only needed when the pages are images. A quick test: try selecting a word with your cursor; if you cannot, it is probably a scan.

There are also mixed PDFs, with some native pages and some scanned ones, which are best handled by applying OCR only to the pages that need it. If you already have real text, running OCR again is unnecessary and can make the result worse.

6OCR in Rayo PDF GO: privacy and review

Scanned documents are often sensitive: contracts, ID cards, medical records, bank statements. That is why it matters where they are processed. In Rayo PDF GO, the OCR tool works on your device, so the file does not have to travel to a server. To start from scratch you can use Scan to PDF and then apply recognition.

Because OCR is not infallible, always review what matters: figures, dates, names, addresses, and document numbers. A zero read as a letter or a six read as a five can change the meaning of a piece of data. If you need the text in a separate file, after OCR you can use Extract text and clean up the result by hand.

One last note about size: running OCR on documents with many pages can take a while and use a lot of memory, especially on a phone. If your file is very large, split it into parts with Split PDF, recognize each part separately, and merge them back with Merge PDF when you are done. That reduces the risk of crashes and lets you review each chunk more calmly.

Related tools

Frequently asked questions

What does OCR stand for?

It stands for Optical Character Recognition. It refers to the technology that turns the text in an image into text a computer can select and search.

How do I know if my PDF needs OCR?

Try selecting or searching for a word in your PDF viewer. If you cannot, the document is an image and needs OCR. If you can select and copy without trouble, it already has real text.

Can OCR read handwriting?

Classic engines perform poorly with handwriting, and results vary a lot depending on the penmanship. With clear printed text, on the other hand, performance is quite good.

Why did my OCR come out with errors?

The most common causes are low resolution, crooked pages, low contrast, the wrong language selected, or decorative fonts. Rescan at 300 DPI, straighten the page, and check the language before trying again.

Does OCR change how the PDF looks?

Normally no. The original image is kept and an invisible text layer is added on top, so visually the document looks the same, but you can now search and copy it.

Is it safe to run OCR on personal documents?

It depends on where it is processed. If the tool works on your own device, the file is not sent to third parties. It is worth confirming this before running recognition on documents with personal data.