One step functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
More...
One step functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
RecAPIPlus has two one-step functions. The RecProcessPagesEx function uses the 1-2-3 workflow from OmniPage 2025.1. It can process multiple image files with multiple pages or it can work from scanner. During the process, it uses all settings as previously set by the application. It does the following in one step: loading, image preprocessing, recognition, page/document formatting, exporting. RecExecuteWorkflow function executes workflow files created by OmniPage 2025.1 and ITest.
One-step functions manage their tasks across multiple threads, striving to achieve the optimal synchronization of the components. For more information about multi-threading see the topic Multi-threading in RecAPI.
Multi-threading is supported on: Windows, Linux only. Thus on other platforms RecExecuteWorkflow
is not supported, and RecProcessPagesEx
performs a sequential workflow.
See also the details about support of different output formats on different platforms.
◆ RecExecuteWorkflow()
RECERR RECAPIPLS RecExecuteWorkflow |
( |
int | sid, |
|
|
LPCTSTR | pWFfilename ) |
Execute a predefined workflow.
Workflows can be created using the Workflow Assistant application (AssistantApp.exe) or using the same interface through OmniPage 2025.1 or ITest.
- Parameters
-
[in] | sid | Settings Collection ID. |
[in] | pWFfilename | Full path to the workflow file. |
- Return values
-
- Note
- The Workflow may interact with the user by means of dialog boxes. These dialogs require a HWND. This HWND can be set with a setting:
HWND hWnd = Application main HWND or GetDesktopWindow();
RECERR RSTSAPI kRecSettingGetHandle(HSETTING root_of_query, const char *symb_name, HSETTING *ret_handle, INTBOOL *has_setting)
Getting the handle of a node.
RECERR RSTSAPI kRecSettingSetInt(int sid, HSETTING sett, int new_value)
Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.
struct RECSTSSTRUCT * HSETTING
Handle of a setting.
Definition KrnStsApi.h:287
-
This function is supported on: Windows.
-
See details about size limits of input images.
-
The specification of this function in C# is:
RECERR
Error codes.
Definition RECERR_doc.h:19
RECERR RECAPIPLS RecExecuteWorkflow(int sid, LPCTSTR pWFfilename)
Execute a predefined workflow.
.
-
The specification of this function in Java is:
-
The specification of this function in Python is:
◆ RecGetRPPErrorList()
Getting errors from last RecProcessPagesEx.
The RecGetRPPErrorList function returns the error list of last RecProcessPagesEx call.
- Parameters
-
[out] | rppErrs | Pointer of a variable to store a pointer of an internal array. This array contains data for the errors happened. |
- Return values
-
- Note
while (rppErrs != NULL)
{
LPCSTR p = NULL;
printf(
"RC:%d/%s, obj:%S - page:%d\n", rppErrs->
rc, p, rppErrs->
obj, rppErrs->
page);
}
RETCODEINFO RECAPIKRN kRecGetErrorInfo(RECERR ErrCode, LPCSTR *lpErrSym)
Getting additional information about an error.
RECERR RECAPIPLS RecGetRPPErrorList(RPPERRORS **rppErrs)
Getting errors from last RecProcessPagesEx.
Error list item.
Definition KernelApi.h:9900
LPWSTR obj
Definition KernelApi.h:9903
struct _RPPERRORS * next
Definition KernelApi.h:9904
int page
Definition KernelApi.h:9902
RECERR rc
Definition KernelApi.h:9901
-
The specification of this function in C# is:
RECERR RECAPIKRN kRecGetRPPErrorList(RPPERRORS **rppErrs)
Getting errors from last kRecProcessPagesEx.
-
The specification of this function in Java is:
-
The specification of this function in Python is:
◆ RecProcessPagesEx()
RECERR RECAPIPLS RecProcessPagesEx |
( |
int | sid, |
|
|
LPCTSTR | pDocFile, |
|
|
LPCTSTR * | pImageFiles, |
|
|
LPONETOUCH_CB | pCallback, |
|
|
void * | pContext ) |
Load, Preprocess, Recognize, Format, Export input images.
This is a high-level function. It loads, preprocesses, recognizes, formats and exports every input image to a single document file.
- Parameters
-
[in] | sid | Settings Collection ID. |
[in] | pDocFile | Full path of the final output document. |
[in] | pImageFiles | Pointer to an array of string pointers that define a set of image files with full path. Wildcard symbols can be used, e.g. *.tif . The last element must be NULL . If a single empty string is specified, the image file open dialog will appear. If pImageFiles is NULL the images come from scanner. |
[in] | pCallback | One-touch callback function for calling back by the Engine page-by-page. |
[in] | pContext | User data passed to the callback function by the Engine. |
- Return values
-
- Note
- There are two special return values at this function: API_ERRORS_HAPPENED_WARN and API_WARNINGS_HAPPENED_WARN. These warnings sign that there are errors or warnings happened during the RecProcessPagesEx call, but some of the pages have been processed correctly. The program can query the complete list of errors occured using RecGetRPPErrorList.
-
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However multithreading is supported on: Windows, Linux only, so this function performs a sequential workflow on other platforms.
-
It uses the programmed OmniPage 1-2-3 Workflow.
-
See details about size limits of input images.
-
The progress monitor callback function is called as usual independently of the one-touch callback. Use one-touch callback function for calling back by the Engine page-by-page If you do not want to abort the current process return
TRUE
.
-
The parameter
notused
of the ONETOUCH_CB is not considered at all.
-
The maximum number of recognition threads started by this function can be specified by the setting Kernel.RPP.RecThreadCount.
-
The format of the output document can be set by the RecSetOutputFormat function.
INTBOOL __declspec(dllexport) RECKRNCALL onetouch_cb(INTBOOL bMore, void *pContext, LPCSTR *notused)
{
INTBOOL r = FALSE;
return (Abort) ? FALSE : TRUE;
}
...
{
#ifdef INPUT_FROM_FILES
LPCSTR ifiles[6] = { NULL, NULL, NULL };
ifiles[0] = "path/test1.tif";
ifiles[1] = "path/test2.tif";
ifiles[0] = "path/test*.*";
ifiles[0] = "";
#else
#endif
...
}
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
RECERR RECAPIPLS RecProcessPagesEx(int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext)
Load, Preprocess, Recognize, Format, Export input images.
RECERR RECAPIPLS RecSetOutputLevel(int sid, OUTPUTLEVEL outLevel)
Set the level of format retention for the final output document.
RECERR RECAPIPLS RecSetOutputFormat(int sid, LPCTSTR pFormatname)
Set the output format.
@ OL_RFP
Definition RecAPIPlus.h:1128
-
The specification of this function in C# is:
INTBOOL RECKRNCALL ONETOUCH_CB(INTBOOL bMore, void *pContext, LPCTSTR *notused)
The user-written "One-touch" callback function.
Definition KernelApi.h:929
-
The specification of this function in Java is:
int RecProcessPagesEx(
int sid, String pDocFile, String[] pImageFiles, OneTouchCallback pCallback)
-
The specification of this function in Python is:
def
RecProcessPagesEx(sid: int, pDocFile: str, pImageFiles: List[str], pCallback:
"OneTouchCallback") -> int