About Optical Character Recognition in Google Drive


Optical Character Recognition in a nutshell

Optical Character Recognition (OCR) lets you convert images with text into text documents using automated computer algorithms. Images can be processed individually (.jpg, .png, and .gif files) or in multi-page PDF documents (.pdf). These are some of the types of files suitable for OCR:

  • Image or PDF files obtained using flatbed scanners
  • Photos taken with digital cameras or mobile phones

Using OCR in Google Drive

In Google Drive, we take your uploaded images or PDF files, scan the file, and use computer algorithms to convert the file into a Google document.

For best results, the image or PDF files need to meet certain requirements:

  • Resolution: High-resolution files work best. As a rule of thumb, we recommend each line of text in the documents to be of at least 10 pixels height.
  • Orientation: Only documents with horizontal left-to-right text are recognized. If you've accidentally scanned or captured a document in a different orientation, please use a program to retouch and edit images to rotate them before uploading to Google Drive.
  • Languages, fonts and character sets: Our OCR engine supports a number of character sets, but support for non-Latin character sets is still experimental. You can select the language of your document from a drop-down menu. You'll get better results if your file includes common fonts such as Arial and Times New Roman.
  • Image quality: Sharp images with even lighting and clear contrasts will work best. Motion blur or bad camera focus will decrease the quality of the detected text.

File size limitations

The maximum size for images (.jpg, .gif, .png) and PDF files (.pdf) is 2 MB. For PDF files, we only look at the first 10 pages when searching for text to extract.

Preservation of text formatting

When processing your document, we attempt to preserve basic text formatting such as bold and italic text, font size and type, and line breaks. However, detecting these elements is difficult and we may not always succeed. Other text formatting and structuring elements such as bulleted and numbered lists, tables, text columns, and footnotes or endnotes are likely to get lost.

OCR can take longer than other uploads into Google Drive. Image files (.jpg, .gif, .png) can take up to 30 seconds and PDF files (.pdf) can take up to a minute.