Tesseract OCR does not work in Print&Share CQ

Symptoms

When using Print&Share or Print&Share CQ, you can perform Optical Character Recognition (OCR). This could for example allow you to use recognition features on scanned documents. One of the options you can choose in the General Configuration or Settings is Tesseract.

This article might help you in case the Tesseract OCR does not work.

After selecting the Tesseract OCR option in the Manage > System settings nothing happens and no text is found when printing documents in Print&Share CQ.

In the Investigate section you see an exception: An unhandled exception has occurred while executing the request. ..

It is also possible you see one of thse error messages:

  • An unhandled exception occured Unable to load DLL 'vcruntime140_cor3.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
  • Error occured when executing query GetPreviewImageForRec Unable to load DLL 'wpfgfx_cor3.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
  • An unhandled exception has occurred while executing the request. Unable to load DLL 'wpfgfx_cor3.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
  • Error occured when executing query GetPreviewImageForChnl Unable to load DLL 'wpfgfx_cor3.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
  • An unhandled exception has occurred while executing the request. Unable to load DLL 'wpfgfx_cor3.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)

Cause

It is possible you don't have the correct Microsoft Visual C++ Redistributable installed, which is required by Tesseract.

Resolution

Solution 1:

Download and install the Microsoft Visual Studio 2015, 2017, 2019, and 2022 Microsoft Visual C++ Redistributable x64 package (msvc-170 x64): https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 (Permalink: X64)

See also