Has anyone used Kofax Capture API for creating a Importer to create a batch in Kofax

有些话、适合烂在心里 提交于 2019-12-06 00:12:35

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.

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

As a suggestion, use Kofax XML (ACXMLAID) proprietary importer, if you create your own importer, you will lose kofax team support and assistance.

My company already created an custom exporter and then rollback all projects to Kofax Database Export to get support of Kofax team.

Solving your problem: Install ACXMLAID and then save your batches as xml to ACXMLAID import to kofax.

If you need more details on how to do this, send me a message.

Thank you!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!