General Service Functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
More...
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.
◆ 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] | sid | Settings Collection ID. |
[out] | thCount | Current thread count. |
- Return values
-
- 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
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:
-
The specification of this function in Python is:
◆ 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] | pCompanyName | Name 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] | pProductName | Name 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
-
- 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 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] | sid | Settings Collection ID. |
[in] | pStsFile | Full path to a setting filename. |
- Return values
-
- Note
- RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
-
The specification of this function in C# is:
RECERR RECAPIPLS RecLoadSettings(int sid, LPCTSTR pStsFile)
Load RecAPIPlus settings.
-
The specification of this function in Java is:
RECERR RECAPIKRN kRecLoadSettings(int sid, LPCTSTR pFileName)
Loading settings.
-
The specification of this function in Python is:
◆ 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
-
- 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:
- save the required setting values from the required Settings Collections,
After RecInitPlus:
- create all the required user settings,
- create the required Settings Collections,
- 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:
◆ RecSaveSettings()
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
-
- Note
- RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
-
The specification of this function in C# is:
RECERR RECAPIPLS RecSaveSettings(int sid, LPCTSTR pStsFile)
Save RecAPIPlus settings.
-
The specification of this function in Java is:
RECERR RECAPIKRN kRecSaveSettings(int sid, LPCTSTR pFileName)
Saving settings of KernelAPI.
-
The specification of this function in Python is:
◆ RecSetDefaultSettings()
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
-
- 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:
-
The specification of this function in Python is:
◆ 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] | sid | Settings Collection ID. |
[in] | thCount | Thread count. |
- Return values
-
- 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 RECAPIPLS RecSetOCRThreadCount(int sid, int thCount)
Set the OCR thread count of the internal workflow manager.
-
The specification of this function in Java is:
-
The specification of this function in Python is: