Programming the toolkit

The following sections contain information that facilitates programming the CSDK toolkit. CSDK supports multiple programming languages and APIs.

For evaluation purposes, we recommend working with the RecAPI interface and possibly the supplied test application ITest. A new, object-oriented .NET API is introduced instead of the old, PInvoke-based API. While both interfaces yield the same recognition accuracy, developers are encouraged to utilize .NET API for greater efficiency.

Use the Sample viewer application to find working samples for all supported programming languages.

The CSDK binaries are compiled by the Microsoft C++ compiler using the /FP:fast option. Thus, the generated code is intended to run in the default floating-point environment and assumes that the floating-point environment is not accessed or modified at runtime. The integrating applications should adhere to these requirements. Do not unmask floating-point exceptions, read or write floating-point status registers, or change rounding modes.

RecAPI C/C++ interface (KernelAPI and RecAPIPlus)

RecAPI is divided into two parts, so your evaluation and development choices are as follows:

RecAPI C/C++ interface (Kernel API)

  • Recommended for high throughput single page processing tasks with plain text output.

  • Best suited for applications where processing time needs to be minimized.

RecAPI C/C++ interface (RecAPIPlus)

  • Supports document-level and high-volume (possibly unattended) processing.

  • Supports fully formatted output, one-step workflow-style processing, and new features such as redaction and form data extraction.

  • Leverages multi-threading to deliver performance benefits on multi-core and hyper-threaded computers.

  • If you choose to use RecAPIPlus, you need to include both the KernelAPI and RecAPIPlus header files into your development project.

For more information, see the RecAPI Online Help.

.NET API Objects interface

The new, object-oriented API is introduced instead of the old PInvoke-based API. This change makes programming more effective.

The old, PInvoke-based API is a simple wrapper around CSDK C/C++ API. It operates on the huge static class, called RecAPI. The names of the functions are the same as in the original REC API. PInvoke-based API is not designed as an object-oriented API.

The new .NET API has the following benefits:

  • Object-oriented approach

  • Classes represent objects of OmniPage SDK processing (Engine, Document, Page, Zone, Image, FormTemplate, and so on)

  • Fully compatible with Visual Studio IntelliSense, no need to remember parameters

  • Easy to use

The new API error handling is based on exceptions. The expected result is returned in case of success, an exception is raised in case of problem.

For more information, see the Objects help.

CSDK overview

CSDK overview

IPROPlus interface

IPROPlus ActiveX interface

Use the IPRO interface only if you need to access the functionality of the Visual Toolbox.

  • Necessary for developers who wish to take advantage of the Visuals Toolbox.

  • Possibility to create and use OmniPage-compatible workflows.

  • Supports document-level processing, along with the ability to easily access all objects and properties involved.

For more information, see the IPROPlus help.

Intelligent Workflow Runner (IWR) interface

Intelligent Workflow Runner is a high availability API for long-running CSDK applications with scale-up capability using declarative programming methods. The IWR API offers high availability and safety for your application. For more information, see Intelligent Workflow Runner.

IWR COM object interface
  • Implemented as an out-proc COM object.

  • Accessible from various COM-compatible frameworks, such as .NET or native/Win32.

Java interface

CSDK offers a Java API to access KernelAPI, RecAPIPlus, and RecPDF functions in Java. The mapping code is generated with SWIG reflecting the C API and uses JNI (Java Native Interface). For more information on limitations, initialization, types, and resource handling, see the RecAPI Java support section in the RecAPI Online Help.

Python interface

CSDK offers a Python API to access KernelAPI, RecAPIPlus, and RecPDF functions in Python. The mapping code is generated with SWIG, reflecting the C API. For more information on limitations, initialization, installation, types, arrays, notation, and resource handling, see the RecAPI Python support section in the RecAPI Online Help.

After the CSDK installation is finished, you need to perform an extra step before using the Python API. For more information, see ''Installation'' under the RecAPI Python support section in the RecAPI Online Help.