API Programming techniques

You create a signed interop for the OCRService. It means writing a program similar to the IWR, or modifying the code of IWR. This program gives XML jobs to OCRService. These jobs can be created before the run, or during runtime. You do not need any API for this, only the Kofax.OmniPageCSDK.IproPlus.JobService assembly.

The other option is to use the API of the Workflow XML Designer. It is not the same as the API used to create custom job itmes, but the API used by the Workflow XML Designer. Use of this API is demonstrated in Using WorkflowXMLDesigner API solution, located in {Program Files or Program Files(x86)}\Kofax\OmniPageCSDK21\Samples\Using WorkflowXMLDesigner API\ Using WorkflowXMLDesigner API.sln.

Connection of API and IproPlus

The API refers to the Kofax.OmniPageCSDK.IproPlus assembly, and uses it as source. The Kofax.OmniPageCSDK.IproPlus assembly is a procedural API, and cannot be used in Worklfow XML Designer on its own.

During the first run, the API generates two assemblies in the local %localappdata%\Kofax_Inc\ WorkflowXMLDesigner.exe_StrongName_wov0dprpycqdxfxsefh53gp3zarchcxd folder: the CSDKConverters.dll-t and the CSDKWorkflow.dll. The Workflow XML Designer uses these assemblies. The API generates these files again if a parameter in the Options > Settings is updated.

If the CSDKConverters.dll and the CSDKWorkflow.dll files are moved to the exe folder, the API never connects the IproPlus again. Thus, programs created with this API does not need an installed CSDK, if the end user selects processing by OmniPage Server, when prompted. If processing through OCRService is selected, an installed CSDK is necessary.

Users can get the CSDKConverters.dll-t and the CSDKWorkflow.dll files the following ways:

  • Copy from the local appdata folder.

  • In command prompt, call Workflow XML Designer with /D option. You can use /A option to export all IproPlus converters.

  • On the UI, select File > Export dynamic class libraries.

The central element of the API is the Kofax.OmniPageCSDK.IproPlus.JobDesign.BuiltIn assembly. It contains the classes of all design job item within the Workflow XML Designer. The API can handle .ocrjob, .xml, and .xwf files. Existing jobs can be loaded and updated, and new jobs can be created through the JobExecutionUnit class. The interface of this class is easy-to use.

The exact use is described in the Using WorkflowXMLDesigner API solution, located in {Program Files or Program Files(x86)}\Kofax\OmniPageCSDK21\Samples\Using WorkflowXMLDesigner API\ Using WorkflowXMLDesigner API.sln.