RecAPI
Functions
General Service Functions Module
RecAPIPlus

General Service Functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, Mac OS X. More...

Functions

RECERR RECAPIPLS  RecInitPlus (LPCTSTR pCompanyName, LPCTSTR pProductName)
  Initialize the RecAPIPlus.
RECERR RECAPIPLS  RecQuitPlus (void)
  Uninitialize the RecAPIPlus.
RECERR RECAPIPLS  RecSaveSettings (int sid, LPCTSTR pStsFile)
  Save RecAPIPlus settings.
RECERR RECAPIPLS  RecLoadSettings (int sid, LPCTSTR pStsFile)
  Load RecAPIPlus settings.
RECERR RECAPIPLS  RecSetDefaultSettings (int sid)
  Set RecAPIPlus settings to default.
RECERR RECAPIPLS  RecSetOCRThreadCount (int sid, int thCount)
  Set the OCR thread count of the internal workflow manager.
RECERR RECAPIPLS  RecGetOCRThreadCount (int sid, int *thCount)
  Get the current OCR thread count of the internal workflow manager.

Detailed Description

General Service Functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, Mac OS X.

The following functions are responsible for the initialization and termination, for loading and saving RecAPIPlus settings, and for setting the count of the OCR threads. RecInitPlus, RecQuitPlus, RecSaveSettings, RecLoadSettings, RecSetDefaultSettings, RecSetOCRThreadCount, RecGetOCRThreadCount.


Function Documentation

RECERR RECAPIPLS RecGetOCRThreadCount ( int  sid,
int *  thCount 
)

Get the current OCR thread count of the internal workflow manager.

The internal workflow manager creates more than one thread when it runs.

Parameters:
[in] sid Settings Collection ID.
[out] thCount Current thread count.
Return values:
RECERR
Note:
Multithreading is supported on: Windows.
This function gets the value of the setting Kernel.RPP.RecThreadCount. This setting can be changed by RecSetOCRThreadCount.
The specification of this function in C# is:
 RECERR RecGetOCRThreadCount(int sid, out int thCount); 
The specification of this function in Java is:
 int RecGetOCRThreadCount(int sid, int[] thCount) 
RECERR RECAPIPLS RecInitPlus ( LPCTSTR  pCompanyName,
LPCTSTR  pProductName 
)

Initialize the RecAPIPlus.

When the program uses RecAPIPlus, it has to call RecInitPlus instead of kRecInit. With only a few exceptions (kRecSetLicense, kRecGetVersion) the functions of KernelAPI should not be called before initialization. This function initializes every module which is initialized in the kRecInit and additionally intializes the document manager subsystem. Use this function to implicitly bind the Engine to the application. When this function is used for the Engine initialization, the RECAPIPLUS.LIB import library must be linked to the application. If you are going to use functions from both KernelAPI and RecAPIPlus, you have to import both KERNELAPI.LIB and RECAPIPLUS.LIB.

Parameters:
[in] pCompanyName Name of the User's Company. It can be NULL. Default value: on Windows systems is OmniPage, on Linux systems is omnipage, on Mac OS X is OmniPage. It is used for creating a company-specific working folder for temporary and other files generated by KernelAPI".
[in] pProductName Name of the Product or Application. It can be NULL. Default value: on Windows systems is CSDK21, on Linux systems is csdk-21.0, on Mac OS X is CSDK-21.0. It is used for creating an application-specific working folder for temporary and other files generated by KernelAPI".
Return values:
RECERR
Note:
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, Mac OS X.
This function DOES NOT initialize the scanning subsystem, its initialization requires a separate kRecScanInit function call.
This function also initializes the KernelAPI.
The specification of this function in C# is:
 RECERR RecInitPlus(string companyName, string productName); 
The specification of this function in Java is:
 int RecInitPlus(String pCompanyName, String pProductName) 
RECERR RECAPIPLS RecLoadSettings ( int  sid,
LPCTSTR  pStsFile 
)

Load RecAPIPlus settings.

This loads all settings under the ApiPlus subtree.

Parameters:
[in] sid Settings Collection ID.
[in] pStsFile Full path to a setting filename.
Return values:
RECERR
Note:
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, Mac OS X.
The specification of this function in C# is:
 RECERR RecLoadSettings(int sid, string stsFilename); 
The specification of this function in Java is:
 int kRecLoadSettings(int sid, String pFileName) 
RECERR RECAPIPLS RecQuitPlus ( void  )

Uninitialize the RecAPIPlus.

The RecQuitPlus function stops the CSDK. It frees all the resources allocated by the Engine. Must be used in pair with the RecInitPlus.

Return values:
RECERR
Note:
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, Mac OS X.
If the scanning subsystem was also initialized, it requires a separate kRecScanQuit call.
The function RecQuitPlus removes all the Settings Collections, pending and user settings, and sets the remaining settings to default, so the setting states are the same after every subsequent RecQuitPlus - RecInitPlus pair. In previous versions of CSDK the RecQuitPlus did not do these steps, thus after a subsequent RecInitPlus all the settings existed and had the same value as before the previous RecQuitPlus. This behaviour can be simulated in CSDK v16 or later doing a workaround: Before RecQuitPlus:
  1. save the required setting values from the required Settings Collections,
After RecInitPlus:
  1. create all the required user settings,
  2. create the required Settings Collections,
  3. load the proper setting files into the proper Settings Collections.
The specification of this function in C# is:
 RECERR RecQuitPlus(); 
The specification of this function in Java is:
 int RecQuitPlus() 
RECERR RECAPIPLS RecSaveSettings ( int  sid,
LPCTSTR  pStsFile 
)

Save RecAPIPlus settings.

This saves all settings under the ApiPlus subtree.

Parameters:
[in] sid Settings Collection ID.
[in] pStsFile Full path to a setting filename.
Return values:
RECERR
Note:
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, Mac OS X.
The specification of this function in C# is:
 RECERR RecSaveSettings(int sid, string stsFilename); 
The specification of this function in Java is:
 int kRecSaveSettings(int sid, String pFileName) 
RECERR RECAPIPLS RecSetDefaultSettings ( int  sid )

Set RecAPIPlus settings to default.

This resets all settings under the ApiPlus subtree to defaults.

Parameters:
[in] sid Settings Collection ID.
Return values:
RECERR
Note:
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, Mac OS X.
The specification of this function in C# is:
 RECERR RecSetDefaultSettings(int sid); 
The specification of this function in Java is:
 int RecSetDefaultSettings(int sid) 
RECERR RECAPIPLS RecSetOCRThreadCount ( int  sid,
int  thCount 
)

Set the OCR thread count of the internal workflow manager.

The internal workflow manager creates more than one thread when it runs. If the thread count of the workflow manager is not set (i.e. its value is -1, which is the default) the number of recognizing threads equals to the logical CPU's number. Otherwise, it equals to the adjusted value.

Parameters:
[in] sid Settings Collection ID.
[in] thCount Thread count.
Return values:
RECERR
Note:
Multithreading is supported on: Windows.
This function sets the value of the setting Kernel.RPP.RecThreadCount. This setting can be retrieved by RecGetOCRThreadCount.
The specification of this function in C# is:
 RECERR RecSetOCRThreadCount(int sid, int thCount); 
The specification of this function in Java is:
 int RecSetOCRThreadCount(int sid, int thCount)