Has anyone used the Kofax Capture API to create an Importer to create a batch in Kofax

I am trying to use the Kofax Capture API and am trying to write a custom module that will perform a scan. To do this, I need to create a package and then process / scan it.

Is there a way to process / scan a packet?

+3
source share
2 answers

Hmm, I don’t know if it can be done inside a user module. When writing a custom module, you usually use the Kofax Capture optimized user module API (DBLiteOpt.dll). I know that you can create an empty batch with a custom module using the 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)

, , .

, . #:

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

Kofax XML (ACXMLAID), , kofax.

, Kofax Database Export, Kofax.

: ACXMLAID, xml ACXMLAID kofax.

, , .

!

0

Source: https://habr.com/ru/post/1711004/


All Articles