本文介绍了有创建进口商创造的Kofax一批人使用的Kofax Capture API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用的Kofax Capture API,并试图编写自定义模块,将做一个扫描。
为了这个,我需要创建一个批处理,然后处理/扫描。

I am trying to use Kofax Capture API and trying to write a custom module which will do a scan.For this i need to create a batch and then process/scan it.

反正是有过程/扫描批次?

Is there anyway to process/scan a batch?

推荐答案

嗯,我不知道这是否是可能的自定义模块里面做。当编写自定义模块您通常使用的Kofax Capture优化自定义模块API(DBLiteOpt.dll)。我知道你可以通过使用RuntimeSession对象的BatchCreate方法创建一个空的批次自定义模块:

Hmm, I don't know if it's possible to do inside a custom module. When writing a custom module you're typically using the Kofax Capture Optimized Custom Module API (DBLiteOpt.dll). I know you can create an empty batch with a custom module by using BatchCreate method of the RuntimeSession object:

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

不幸的是,我不知道的任何方式将文档导入的那批。

Unfortunately, I don't know of any way to import documents into that batch.

您可以始终只是创建导入一批独立的程序。下面是一些C#伪code:

You can always just create a stand-alone program that imports a batch. Here's some C# pseudo-code:

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() ;

这篇关于有创建进口商创造的Kofax一批人使用的Kofax Capture API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 00:22