RecAPI
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Modules Pages
General Service Functions Module

General Service Functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. 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, MacOS.

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

◆ RecGetOCRThreadCount()

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]sidSettings Collection ID.
[out]thCountCurrent thread count.
Return values
RECERR
Note
Multithreading is supported on: Windows, Linux.
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);
RECERR
Error codes.
Definition RECERR_doc.h:19
RECERR RECAPIPLS RecGetOCRThreadCount(int sid, int *thCount)
Get the current OCR thread count of the internal workflow manager.
The specification of this function in Java is:
int RecGetOCRThreadCount(int sid, int[] thCount)
The specification of this function in Python is:
def RecGetOCRThreadCount(sid: int) -> Tuple[int, int]

◆ RecInitPlus()

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]pCompanyNameName of the User's Company. It can be NULL. Default value: on Windows systems is OmniPage, on Linux systems is omnipage, on MacOS is OmniPage. It is used for creating a company-specific working folder for temporary and other files generated by KernelAPI.
[in]pProductNameName of the Product or Application. It can be NULL. Default value: on Windows systems is CSDK22, on Linux systems is csdk-2025.1, on MacOS is CSDK-2025.1. 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, MacOS.
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);
RECERR RECAPIPLS RecInitPlus(LPCTSTR pCompanyName, LPCTSTR pProductName)
Initialize the RecAPIPlus.
The specification of this function in Java is:
int RecInitPlus(String pCompanyName, String pProductName)
The specification of this function in Python is:
def RecInitPlus(pCompanyName: Optional[str], pProductName: Optional[str], csdkPath: Optional[str] = None) -> int

◆ RecLoadSettings()

RECERR RECAPIPLS RecLoadSettings ( int sid,
LPCTSTR pStsFile )

Load RecAPIPlus settings.

This loads all settings under the ApiPlus subtree.

Parameters
[in]sidSettings Collection ID.
[in]pStsFileFull path to a setting filename.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecLoadSettings(int sid, string stsFilename);
RECERR RECAPIPLS RecLoadSettings(int sid, LPCTSTR pStsFile)
Load RecAPIPlus settings.
The specification of this function in Java is:
int kRecLoadSettings(int sid, String pFileName)
RECERR RECAPIKRN kRecLoadSettings(int sid, LPCTSTR pFileName)
Loading settings.
The specification of this function in Python is:
def kRecLoadSettings(sid: int, pFileName: str) -> int

◆ RecQuitPlus()

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, MacOS.
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 RECAPIPLS RecQuitPlus(void)
Uninitialize the RecAPIPlus.
The specification of this function in Java is:
The specification of this function in Python is:
def RecQuitPlus() -> int

◆ RecSaveSettings()

RECERR RECAPIPLS RecSaveSettings ( int sid,
LPCTSTR pStsFile )

Save RecAPIPlus settings.

This saves all settings under the ApiPlus subtree.

Parameters
[in]sidSettings Collection ID.
[in]pStsFileFull path to a setting filename.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecSaveSettings(int sid, string stsFilename);
RECERR RECAPIPLS RecSaveSettings(int sid, LPCTSTR pStsFile)
Save RecAPIPlus settings.
The specification of this function in Java is:
int kRecSaveSettings(int sid, String pFileName)
RECERR RECAPIKRN kRecSaveSettings(int sid, LPCTSTR pFileName)
Saving settings of KernelAPI.
The specification of this function in Python is:
def kRecSaveSettings(sid: int, pFileName: str) -> int

◆ RecSetDefaultSettings()

RECERR RECAPIPLS RecSetDefaultSettings ( int sid)

Set RecAPIPlus settings to default.

This resets all settings under the ApiPlus subtree to defaults.

Parameters
[in]sidSettings Collection ID.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RECAPIPLS RecSetDefaultSettings(int sid)
Set RecAPIPlus settings to default.
The specification of this function in Java is:
int RecSetDefaultSettings(int sid)
The specification of this function in Python is:
def RecSetDefaultSettings(sid: int) -> int

◆ RecSetOCRThreadCount()

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]sidSettings Collection ID.
[in]thCountThread count.
Return values
RECERR
Note
Multithreading is supported on: Windows, Linux.
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);
RECERR RECAPIPLS RecSetOCRThreadCount(int sid, int thCount)
Set the OCR thread count of the internal workflow manager.
The specification of this function in Java is:
int RecSetOCRThreadCount(int sid, int thCount)
The specification of this function in Python is:
def RecSetOCRThreadCount(sid: int, thCount: int) -> int