有没有人使用Kofax Capture API创建导入器以在Kofax中创建批处理

时间:2009-06-22 15:53:58

标签: api kofax

我正在尝试使用Kofax Capture API并尝试编写一个可以进行扫描的自定义模块。 为此,我需要创建一个批处理,然后处理/扫描它。

无论如何处理/扫描批次?

2 个答案:

答案 0 :(得分:5)

嗯,我不知道是否可以在自定义模块中进行。编写自定义模块时,通常使用Kofax Capture优化自定义模块API(DBLiteOpt.dll)。我知道你可以使用RuntimeSession对象的BatchCreate方法创建一个带有自定义模块的空批处理:

'*** Get your Process Id
pid = m_oLogin.ProcessId '*** Create new batch
Set m_oBatch = m_oRuntimeSession.BatchCreate("SomeBatchClass", "MyBatch", pid)

不幸的是,我不知道将文档导入该批次的任何方法。

您始终可以创建一个导入批次的独立程序。这是一些C#伪代码:

Kofax.AscentCaptureModule.ImportLogin myLogin ;
Kofax.AscentCaptureModule.Application myApp;

// login first
myLogin = new Kofax.AscentCaptureModule.ImportLogin() ;
myApp = myLogin.Login("myUsername", "myPassword") ;

// create a new batch 
Kofax.AscenCaptureModule.BatchClass myBatchClass =
myApp.BatchClasses["MyBatchClassName"];
Kofax.AscentCaptureModule.Batch = 
myApp.CreateBatch(ref myBatchClass, "TheNameOfMYBatch");

// create a new document and set its form type
Kofax.AscentCaptureModule.Document myDoc ;
Kofax.AscentCaptureModule.Page myPage = null ;
myDoc = myBatch.CreateDocument(null) ;
Kofax.AscentCaptureModule.FormType myFormType = 
myBatch.FormTypes[1] // - just hardcoded a form type here
myDoc.set_FormType(ref myFormType) ;

// add some pages to the doc
Kofax.AscentCaptureModule.Pages myPages = myBatch.ImportFile("SomeFilePath") ;
foreach(Kofax.AscentCaptureModule.Page myPage in myPages)
{
     myPage.MoveToDocument(ref myDoc, null) ;
}

myApp.CloseBatch() ;

答案 1 :(得分:0)

作为建议,使用Kofax XML(ACXMLAID)专有导入程序,如果您创建自己的导入程序,您将丢失 kofax团队支持和帮助。

我的公司已经创建了一个自定义导出器,然后将所有项目回滚到Kofax Database Export以获得Kofax团队的支持。

解决您的问题: 安装ACXMLAID,然后将您的批次保存为xml,将ACXMLAID导入到kofax。

如果您需要有关如何执行此操作的详细信息,请给我发送消息。

谢谢!