I want to create a Kofax Export Connector and register it in the Administration module. I created a Class Library (.NET Framework)
with the following code for the setup and release
KfxReleaseSetupScript.cs
namespace Kofax_CoBRA_Export
{
[Guid("b826cc5a-ed80-4fe1-a80f-86a08cca2851")]
public interface IKfxReleaseSetupScript
{
ReleaseSetupData SetupData { get; set; }
KfxReturnValue OpenScript();
KfxReturnValue CloseScript();
KfxReturnValue RunUI();
KfxReturnValue ActionEvent(KfxActionValue action, string dataStringOne, string dataStringTwo);
}
[Guid("39a4f6f6-0de1-40b2-8934-d9a7c2c79468")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("Kofax_CoBRA_Export.KfxReleaseSetupScript")]
internal class KfxReleaseSetupScript : IKfxReleaseSetupScript
{
// Interface Implementation
}
}
KfxReleaseScript.cs
namespace Kofax_CoBRA_Export
{
[Guid("091d8f6c-b4c4-42d4-81aa-3b86b31ce46d")]
public interface IKfxReleaseScript
{
ReleaseData DocumentData { get; set; }
KfxReturnValue OpenScript();
KfxReturnValue CloseScript();
KfxReturnValue ReleaseDoc();
}
[Guid("e034c243-ae35-4823-9f2f-10bb6a6fe5c0")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("Kofax_CoBRA_Export.ReleaseScript")]
internal class KfxReleaseScript : IKfxReleaseScript
{
// Interface Implementation
}
}
My .inf
registration file contains this code
[Scripts]
Kofax_CoBRA_Export
[Kofax_CoBRA_Export]
SetupModule=.\bin\Debug\Kofax_CoBRA_Export.dll
SetupProgID=Kofax_CoBRA_Export.KfxReleaseSetupScript
SetupVersion=1.0
ReleaseModule=.\bin\Debug\Kofax_CoBRA_Export.dll
ReleaseProgID=Kofax_CoBRA_Export.KfxReleaseScript
ReleaseVersion=1.0
SupportsNonImageFiles=True
RemainLoaded=True
SupportsKofaxPDF=True
SupportsOriginalFileName=True
SupportsMultipleInstances=False
DisplayName=Kofax_CoBRA_Export
When I select the .inf
file in the adminstration module I just get an empty box so there is nothing to install.
I took the information from
Kofax Capture Developer's Guide 10.0.0
KCEC-Text Exporter Sample
Kofax Capture API Reference Guide
Kofax Capture Export Type Library
but I really don't get why I get anything to install in the administration module. Any help would be appreciated.
When providing a relative path, Kofax expects the binaries in its own directory (usually C:\Program Files (x86)\Kofax\CaptureSS\ServLib\Bin
on a server, as admin.exe runs using this working path). In your case that would translate to C:\Program Files (x86)\Kofax\CaptureSS\ServLib\Bin\bin\Debug\Kofax_CoBRA_Export.dll
.
Note that Kofax recommends copying all custom binaries including your inf file to the server directory, however I prefer creating a sub folders for my code, putting all files there. Then, my inf file would look as follows:
[Scripts]
SmartCAP.KEC.EnergieAG.SAP
[SmartCAP.KEC.EnergieAG.SAP]
SetupModule=SmartCAP.KEC.EnergieAG.SAP.dll
SetupProgID=SmartCAP.KEC.EnergieAG.SAP.Setup
SetupVersion=11.0
ReleaseModule=SmartCAP.KEC.EnergieAG.SAP.dll
ReleaseProgID=SmartCAP.KEC.EnergieAG.SAP
ReleaseVersion=11.0
SupportsNonImageFiles=True
SupportsKofaxPDF=True
Note that Kofax still needs to be able to resolve all dependencies you used in your solution - most definitely internal ones such as the Kofax.ReleaseLib.Interop.DLL
- so, you could either copy them there, or - that's what I'd prefer, use a custom assembly resolver in your code, pointing to the server directory.