Nicomsoft OCR: Developer's Guide


Redistribution of Nicomsoft OCR files

Note:
           You may not copy or redistribute files without obtaining the appropriate license. Please refer to Ordering and Contact Information for details.

Note:
           You may not distribute header files with your application, and you may not provide software development capabilities in your application.


Note:
           You may not distribute the NSOCR SDK. A license allows you to distribute the "Bin", "Bin_64" and "Bin_common" folders only.


The files for redistribution are installed by the NSOCR SDK installer into the "Bin", "Bin_64" and "Bin_common" subfolders of the NSOCR installation folder. Depending on your application and the target Windows version, two or three directories are necessary for your application:

Application type / Platform Windows x86 Windows x64
Native application (C/C++, Delphi, C++ Builder, etc.) x86 "Bin", "Bin_common" "Bin", "Bin_common"
Native application (C/C++, Delphi, C++ Builder, etc.) x64 - "Bin_64", "Bin_common"
.NET application with the "AnyCPU" target platform "Bin", "Bin_common" "Bin_64", "Bin_common"
.NET application with the "x86" target platform "Bin", "Bin_common" "Bin", "Bin_common"
.NET application with the "x64" target platform - "Bin_64", "Bin_common"


It is possible to get rid of "Bin_common" folder: just copy all its files to both "Bin" and "Bin_64" folders.
You can also exclude some files to reduce the total size of the NSOCR runtime files that need to be distributed with your application:

File name Purpose Can be excluded?
NSOCR.dll OCR main module NO
NsImgLdr.dll Image loading and processing module NO
NsSpell.dll Spellchecker module NO
Config.dat Configuration file NO
EN.lng English dictionary NO
ALL_base.dat Character templates (for all languages) NO
sd.dat OCR helper data file NO
DE.lng, ES.lng, FR.lng, etc. Language dictionaries YES
rgb.icc, gray.icc ICC profiles for saving documents as PDF/A YES
ICRDGT_base.dat Character templates for handwritten digits (BT_ICRDIGIT) YES
pdf_font.ttf TrueType font for non-English languages support in output PDF files YES
NsBars.dll Barcodes recognition module YES
TWAINDSM.dll TWAIN scanning module YES
"ASIAN" folder Asian module and data files for Chinese, Arabic, Korean and Japanese languages YES


Note:

NSOCR’s main module is "NSOCR.DLL". It exposes OCR functions both via DLL and via COM.
If your application directly uses NSOCR functions from DLL, it must know and use the correct path to the "NSOCR.DLL" file in the "Bin" (x86 application) or "Bin_64" (x64 application) folder.
If your application uses NSOCR via COM, you need to register "NSOCR.DLL" as a COM server with the "regsvr32.exe" Windows tool. Note that you must specify the path to NSOCR.DLL in the "Bin" folder to register an x86 COM server, or to NSOCR.DLL in the "Bin_64" folder to register an x64 COM server. For .NET applications with the "AnyCPU" target platform, you need to register both x86 and x64 COM servers if Windows x64 is used.

A typical example of using OCR in your software:

           Say, you use OCR as a COM object in your C# or VB.NET application (like both C# and VB.NET Advanced Samples in the NSOCR SDK do). The target platform is "AnyCPU", so your application will be an x86 application in Windows x86, and an x64 application in Windows x64. Your software can be installed on Windows x86 or x64. Your software installer must do the following, assuming that it has administrative privileges: