A simple module to extend islandora solution pack ingest processes by generating OCR for uploaded images via Tesseract. Enables the generation/parsing of OCR and HCOR data-streams.
Pull request Compare This branch is 61 commits ahead of nigelgbanks:7.x.
Latest commit bce7c1a Mar 16, 2017 @rosiel rosiel committed on GitHub Merge pull request #78 from nmader/7.x-ISLANDORA_OCR-1880
7.x islandora ocr 1880
Failed to load latest commit information.
build Build and doxyfile fixes Mar 26, 2013
includes islandora-1848. Unmanged file cleanup (#73) Feb 23, 2017


Islandora OCR Build Status


This module acts a Toolkit for generating OCR and word coordinate information. At the moment it relies exclusively on Tesseract to generate this information.


Tesseract is an OCR engine that was developed at HP Labs between 1985 and 1995. It is currently being developed at Google. Recognized as one of the most accurate open source OCR engines available, Tesseract will read binary, grey, or colour images and output text.

A TIFF reader that will read uncompressed TIFF images is also included. Islandora Book Solution Pack currently uses Tesseract version 3.02.02, which can be obtained from the project home page. Lower versions are not supported.


This module requires the following modules/libraries:

Tesseract installation will differ depending on your operating system; please see the Tesseract Wiki for detailed instructions.


Install as usual, see this for further information.


In Administration » Islandora » Islandora Utility Modules » OCR Tool (admin/islandora/tools/ocr), configure the following:

  • Set the path for Tesseract
  • Select languages available for OCR
  • Enable/disable Solr Fast Vector Highlighting
  • Set Solr field containing OCR text and the maximum number of results to return in a Solr query


Solr result highlighting

To have Islandora viewers recognize Solr search results and highlight them, one will need to configure Solr to index the HOCR in a particular fashion.

The field that the HOCR is stored in must have the following attributes: indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true"

Each text node of each element in the HOCR datastream must be placed in order in a single value for the Solr field with all whitespace sub strings normalized to a single space.

Any objects that were previously ingested but require this functionality will need to be re-indexed.

Reference Implementation


Tesseract provides many languages which can be downloaded from here.

To install just unzip them in your tessdata directory, typically located at /usr/local/share/tessdata

If you want to add your own langauges or train your Tesseract for your specific needs please review the documentation here


Further documentation for this module is available at our wiki.


Having problems or solved a problem? Check out the Islandora google groups for a solution.


Current maintainers:


If you would like to contribute to this module, please check out CONTRIBUTING.md. In addition, we have helpful Documentation for Developers info, as well as our Developers section on the Islandora.ca site.