RecAPI
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Modules Pages
Document-level processing

The document-level processing is supported on: Windows, Linux, Embedded Linux, MacOS.

This level is performed by the API layer RecAPIPlus. It uses a document-oriented approach built up on the basis of page-level processing. Thus, the Developer of a document-oriented integrating application calls both KernelAPI and RecAPIPlus functions. This layer provides all the features and capabilities of KernelAPI extended with the offering of a greater number of output converters and of handling multipage documents. The output converters give more accurate layout in various output formats. The multipage document handling can explore the connectivity and similarity of consecutive pages in the same document.

IMPORTANT! This tutorial on document-level processing presents some operations that are accessible only at document level or that are different when applied at document level.

The simplest running application is the following (it loads a file test.tif and after recognition, creates an RTF2000 output out.rtf - all settings take default values):

#include "RecAPIPlus.h"
int main()
{
RECERR rc = REC_OK;
rc = RecInitPlus(YOUR_COMPANY, YOUR_PRODUCT);
if (rc != REC_OK && rc != API_INIT_WARN && rc != API_LICENSEVALIDATION_WARN)
printf("Initialization error occured: %x\n", rc);
else
{
char image[] = "test.tif";
LPCSTR imgptr[2] = {image, NULL};
rc = RecProcessPagesEx(0, "out.rtf", imgptr, NULL, NULL);
if (rc != REC_OK)
printf("Processing error occured: %x\n", rc);
rc = RecQuitPlus();
if (rc != REC_OK)
printf("Quitting error occured: %x\n", rc);
}
return kRecGetLastError(NULL, NULL, 0);
}
RECERR
Error codes.
Definition RECERR_doc.h:19
RECERR RECAPIKRN kRecGetLastError(LONG *pErrExt, LPTSTR pErrStr, int buflen)
Getting last error.
@ API_INIT_WARN
Module initialization warning.
Definition RECERR_doc.h:67
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
@ API_LICENSEVALIDATION_WARN
License cannot be validated.
Definition RECERR_doc.h:95
RECERR RECAPIPLS RecProcessPagesEx(int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext)
Load, Preprocess, Recognize, Format, Export input images.
RECERR RECAPIPLS RecQuitPlus(void)
Uninitialize the RecAPIPlus.
RECERR RECAPIPLS RecInitPlus(LPCTSTR pCompanyName, LPCTSTR pProductName)
Initialize the RecAPIPlus.

Basics
Document
One-step processing
Output