0

I am trying to figure out what would be the best way(if possible) to enable Kofax Capture users to annotate tiff images while processing them (preferably in Validation step in Kofax Capture/KTM. I do have a Atalasoft DotImage library that can annotate pdf and tif files, so I have to figure out how to develop this custom module/panel and plug it in validation screen so users can use it to burn annotations into images in the batch.

Thanks,

Goran

1 Answers1

0

First: Only KC validation can use a custom panel, and if you are already or intending to use KTM Validation, you won't want to switch to KC Validation.

KTM interactive modules have functionality called sticky notes. This built in functionality lets a user add a note to any location of an image. These notes are then accessible via the document object in script (pXDoc.Annotations). These do not burn into the image out of the box, however you could let the users use this interface then use the Batch_Close event to loop through documents and access the notes they have created. Make sure you check the close mode so you don't take action when the batch suspends or closes in error.

At that point you might go different routes:

  1. Modify the images directly from Validation's Batch_Close event - KTM script can only see COM visible assemblies and I believe Atalasoft is not. So you will need to create your own COM visible assembly which takes coordinates and text from the note. Then call this in Batch_Close to annotate your image.
  2. Store the text and coordinates to modify the image later - You might to use Batch_Close just to get the data out of KTM and into either KC Custom Storage Strings or an external file alongside the images. Then you would write a KC custom module to use that data to modify the image.

The second option might be more work, but my instinct is to avoid any complexity in interactive modules.

Stephen Klancher
  • 1,374
  • 15
  • 24
  • Thanks a lot Stephen! – Goran Djordjevic Jul 30 '15 at 14:20
  • We do use KTM. I need little help on how to get to the Batch_Close event? I can't do this using Visual Studio, but writing the script within Kofax, correct? And, once I write the script to access user generated notes, which COM component can I use to burn them permanently into the image, if Atalasoft doe not work. Is this done in SBL/VB.net script inside Batch_Close event? Thanks again – Goran Djordjevic Jul 30 '15 at 14:29
  • Batch_Close is an event in KTM project script (which is VB). You will need to get familiar with Project Builder to edit the project. KTM does not have any functions particularly friendly to annotation, so I assume you still want to use Atalasoft. KTM script is COM based, and Atalasoft is .NET. My suggestion is that you create your own COM visible .NET assembly to call any Atalasoft functions you need. Then call your assembly from KTM script. – Stephen Klancher Aug 02 '15 at 21:14
  • Thanks again Stephen! Do you know where can I read more about KTM Project Builder and see some samples? – Goran Djordjevic Aug 03 '15 at 20:08
  • Any system on which you install KTM will include Project Builder by default. Open project builder and open your project (or create a new one). Right click on the project level or a class and click "Show Script." From the script window you can go to Help>Scripting Help for concepts and examples, or Help>Scripting Object References for specific API documentation. – Stephen Klancher Aug 03 '15 at 21:37
  • Thanks again Stephen. I will create my COM visible assembly with Atalasoft methods, reference it and call methods to burn annotations on the document (tif) in Validation Batch_Close event. Is it easy to pass the KTM document (tif) ref to a Atalasoft method? (Usually those Atalasoft methods take document file path as a parameter). Is it possible to get KTM document location (file path) in the Batch_Close event? Thanks, Goran – Goran Djordjevic Aug 04 '15 at 12:54
  • In Batch_Close you would itterate over XRootFolder.DocInfos. A DocInfo is a "lighter" document object, from which you can get the XDoc: DocInfo.XDocument. Then access specific pages as needed: pXDoc.CDoc.Pages(i).FileName. Don't make the mistake of trying to use pXDoc.Pages, as that is a very different thing. – Stephen Klancher Aug 06 '15 at 13:24