Aquaforest OCR SDK Trouble Shooting Guide

This blog has been created to assist users in trouble shooting issues they may experience when using the Aquaforest OCR SDK for .Net software.

Replicating Issues Using Sample Applications

The Aquaforest OCR SDK comes with a number of sample applications written in both VB and C#. The sample applications illustrate the simplicity in which the OCR SDK can be used to convert Tiff to PDF or OCR image files. These sample applications can also be used to test any issues you may experience in your own project; by using one of the applications you can narrow down the root cause of the problem you’re experiencing as well reducing the turnaround time for resolution. If you do come across an issue we recommend that you follow the steps below:
  • Use the same file set on one of our sample applications.
  • If you can reproduce the issue with a sample application, send a copy of the test file and information on which sample application you used to support@aquaforest.com

Generating Additional Debug Information

  • If you are unable to reproduce the issue with a sample application, then include the lines of code circled in red from the screenshot below into your own code to generate further debugging.
  • Run your application once more and send the output generated by the debug.

Analysing Temporary Files

This can be very useful if you wish to see what effects the pre-processing settings have had on a page before it is passed to the OCR engine.
  • Ensure you have made a reference the following in your namespace: using Aquaforest.OCR.Definitions.Enums;
  • Add the following code to your project: _ocr.EnableDebugOutput = (int) DebugLevels.LEAVE_TEMP_FILES_IN_PLACE;
The temoprary files can be found in the following location and a folder will be present for each doucment which has been OCR’d:.
  • C:\Users\username\AppData\Local\Temp\AquaforestOcr
  • Also accessible by %temp%\AquaforestOcr
A document which consists of 1 page will have the following corresponding files in the temporary location:
  • extract (folder)
  • source_tiff (folder)
  • 0_1.bmp
  • 0_1.hocr
  • 0_1.tif
  • output.pdf
  • output.txt
To see what effects the pre-processing settings have had on the page before it was passed to the OCR engine compare 0_1.hocr with 0_1.tif (which is a copy of the source file).

This Application Has Failed To Start Because The Application Configuration Is Incorrect.” EXCEPTION 0X800736B1

Your application runs without a problem on your development system but when you install it to a new system you get an error similar to the following: System.Runtime.InteropServices.COMException (0x800736B1): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception fromHRESULT: 0x800736B1) The OCR SDK includes VC++ components and therefore requires that the VC++ 2008 runtime is installed. These will be installed on a development system because they are included in the Visual Studio Installation and they may be present on target systems if any applications that also use this runtime have previously been installed.

The Specified Module Could Not Be Found. (EXCEPTION FROM HRESULT: 0X8007007E)

When you try to run your application you see an error similar to the following: The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Aquaforest.OCR.Api.Ocr.ReadTIFFSource(String fileName) at Web_Application._Default.ButtonConvert_Click(Object sender, EventArgs e) in C:\Aquaforest\OCRSDK\samples\asp.net\Web Application\Default.aspx.cs:line 59 In order to locate the unmanaged components the location of the OCRSDK\bin contents must be set in the PATH environmental variable as well as on the ResourceFolder property.

Could Not Load File or Assembly ‘XXXX’ Or One Of Its Dependcies

When you try to run your application you see an error similar to the following: Could not load file or assembly ‘zlib’ or one of its dependencies. The module was expected to contain an assembly manifest. at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) at Aquaforest.OCR.Api.Ocr.[1][1](PreProcessor [1][1]) at Aquaforest.OCR.Api.Ocr.Recognize(PreProcessor preProcessor) at Web_Application._Default.ButtonConvert_Click(Object sender, EventArgs e) in C:\Aquaforest\OCRSDK\samples\asp.net\Web Application\Default.aspx.cs:line 66 In order to locate the unmanaged components the location of the OCRSDK\bin contents must be set in the PATH environmental variable as well as on the ResourceFolder property.

Author

Neil Pitman

Head of IT Business Solutions

Neil established Aquaforest in 2001 to provide high-performance PDF, OCR, and SharePoint products to a worldwide market.

Categories

Archive

Share Post

Related Posts

Autobahn can perform a great many functions. One that is often asked about is PDF/A compliance. In this use case, I will be using…
Explore the capabilities of Searchlight OCR through three videos that demonstrate its seamless integration and transformative capabilities for document management and OCR in SharePoint. …