【问题标题】:Has anyone used Kofax Capture API for creating a Importer to create a batch in Kofax有没有人使用 Kofax Capture API 来创建 Importer 以在 Kofax 中创建批次
【发布时间】:2016-09-10 07:03:45
【问题描述】:

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

有没有办法处理/扫描一个批次?

【问题讨论】:

    标签: api kofax


    【解决方案1】:

    嗯,我不知道是否可以在自定义模块中进行。编写自定义模块时,您通常使用 Kofax Capture Optimized Custom Module 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() ;
    

    【讨论】:

    • 更新:绝对可以创建一个新批次并将页面导入自定义模块中。但是,您不能仅使用优化的自定义模块 API 来实现 - 您需要使用 Kofax Capture Document Access 库 (DBLite.dll)。
    • 谢谢,这正是我想要的。
    【解决方案2】:

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

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

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

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

    谢谢!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多