Technical FAQs for "SDK"

Question

My service is crashing in IIS, and I see an error saying w3wp.exe has crashed in my Event Viewer. Why is my service crashing?

Answer

Normally, when there is an error in the Event Viewer saying that w3wp.exe has crashed, this means that your application pool has crashed. So, by extension, anything running on IIS will stop working. There are many reasons why this could happen, so to find out the root cause, there are a few things that you can do:

  1. Look at the dump file generated by the Event Viewer
    that is tied to this specific error.
  2. Run this file through WinDbg to get a stack trace of the
    error.

These two things should give you the information you need to determine the root cause of the problem. Below is an online article explaining in more detail how to get these two things and possible causes of the crash.

http://blog.whitesites.com/Debugging-Faulting-Application-w3wp-exe-Crashes__634424707278896484_blog.htm

Question

How do I remove XMP Data from my image using ImageGear .NET?

Answer

When removing XMP data in ImageGear, the simplest way to do this is to set the XMP Metadata node to null, like so:

ImGearSimplifiedMetadata.Initialize(); 
doc.Metadata.XMP = new ImGearXMPMetadataRoot();

Or, you can traverse through the metadata tree and remove each node from the tree:

// Example code. Not thoroughly tested
private static void RemoveXmp(ImGearMetadataTree tree)
{
ArrayList toRemove = new ArrayList();
foreach (ImGearMetadataNode node in tree.Children)
{
    if (node is ImGearMetadataTree)
        RemoveXmp((ImGearMetadataTree)node);

    if (node.Format != ImGearMetadataFormats.XMP)
        continue;

    toRemove.Add(node);
}

foreach (ImGearMetadataNode node in toRemove)
    tree.Children.Remove(node);
}
Question

How do I change the default directory of the SmartZone folder from %TEMP% to something else?

Answer

As SmartZone runs, it will create a folder in the %TEMP% directory containing a few files that the engine needs to run. If you want to change this location, you can do that by creating an INI file in the same directory as the executable that runs your application. You must name that INI file smartzoneengineloader.ini. The contents of smartzoneengineloader.ini should look like this:

[smartzoneengineloader] tempdir = C:\Your\Path\Here\
Question

Why do I get a “File Format Unrecognized” exception when trying to load a PDF document in ImageGear .NET?

Answer

You will need to set up your project to include PDF support if you want to work with PDF documents. Add a reference to ImageGear24.Formats.Pdf (if you’re using another version of ImageGear, make sure you’re adding the correct reference). Add the following line of code where you specify other resources:

using ImageGear.Formats.PDF;

Add the following lines of code before you begin working with PDFs:

ImGearFileFormats.Filters.Insert(0, ImGearPDF.CreatePDFFormat());
ImGearPDF.Initialize();

The documentation page linked here shows how to add PDF support to a project.

Question

How can I improve the performance and memory usage of scanning/recognition in Barcode Xpress?

Answer

Barcode Xpress supports a number of optimization settings that can improve your recognition performance, sometimes up to 40%, along with memory usage. The best way to optimize Barcode Xpress is to fine-tune the properties of the Reader class to be specific to your application’s requirements.

BarcodeTypes

  • The best way to increase performance is to limit which barcodes Barcode Xpress should search for. By default, BarcodeTypes is set to UnknownBarcode which targets all 1D barcodes.

MaximumBarcodes

  • This property will instruct Barcode Xpress to halt searching after finding a specified number of barcodes. The default value is 100.

Area & Orientation

  • If you know the location or orientation of your barcodes in your image, specifying an orientation (such as Horizontal) and area can prevent Barcode Xpress from searching for vertical or diagonal barcodes, or in places where barcodes would not exist.

ScanDistance

  • Raising this value increases performance by applying looser recognition techniques by skipping rows of an image. However, this may fail to detect barcodes.

Finally, BarcodeXpress Professional edition does not impose a 40 page-per-minute limit on processing.

Question

How do I ensure temp files are deleted when closing ImageGear .NET?

Answer

All PDF objects are based on underlying low-level PDF objects that are not controlled by .NET resource manager and garbage collector. Because of this, each PDF object that is created from scratch should be explicitly disposed of using that object’s Dispose() method.

Also, any ImGearPDEContent object obtained from ImGearPDFPage should be released using the ImGearPDFPage.ReleaseContent() in all cases.

This should cause all temp files to be cleared when the application is closed.

Question

What does it mean when I see “Email Address is not Registered” when entering in an email in the Evaluation Dialog?

Answer

You will see this error if you have not registered on the Accusoft website.

To register your email address, please visit the following link below:

https://my.accusoft.com/Account/FirstTimeUser?Length=7

Question

How do I use a Network Drive path for Image and ART storage in my ImageGear .NET web application?

Answer

In an ImageGear .NET web application, you have to define the location of the images and annotations directory in the storageRootPath and artStorageRootPath configuration property.
In the current version of ImageGear .NET, the storageRootPath and artStorageRootPath do not work with a network drive path \\SERVER-NAME\sharefilename.

The workaround for this would be to create a Symbolic link from a local directory to the network drive directory.

  • To create a symbolic link: Open “Command Prompt” as Administrator and type in > mklink /d "local path" \\SERVER-NAME\sharefilename
  • Pass in the path of the symbolic link as image or art storage root path in your web.config: storageRootPath="local path" artStorageRootPath="local path"
Question

What quality should my images be for processing form data and recognition using FormSuite?

Answer

In all cases, you want to have your images as clear and as clean as possible. For any particular procedure, please consider the following:

OCR and ICR: Capture images in at least 300 DPI resolution. Ideally, working in black and white allows the objects of interest on your image to be better defined and recognized. Free the image form all noise as much as possible. As if a human were reading it, you want the text objects on the image to be as legible as possible. For ICR, ensure that the characters are printed (no cursive text, etc).

Barcode recognition: As with OCR and ICR, capture images in at least 300 DPI and working with black and white content can provide excellent results. Ensure that the bars in the barcodes are clearly defined on the image and are not malformed (for example, the barcodes should have the proper start and stop sequence, etc). Clear as much noise from the image as possible.

Forms matching and registration: As with the prior 2 items above, capture your documents in at least 300 DPI. Ensure that your resolution is consistent between your form templates and incoming batch images. Form templates should only contain data that is common to every image that is being processed (i.e. Form fields, the text that appears on the blank form itself, etc). The template should not have filled-in field information as this will affect the forms matching process.

Question

The ISIS Xpress BasicCapabilities and AdvancedCapabilities samples demonstrate a number of different ways to acquire images and save a batch of them to file, but how can I get a single image as soon as it gets acquired by the scanner?

Answer

During the ISIS Xpress Scanned() event, you can get the currently acquired page via the ISISXpress.Output property (i.e., – ISISXpress.Output.TransferTo() or ISISXpress.Output.ToHdib()).

Question

How do I change the classifier to read a specific language in SmartZone v2

Answer

Please refer to the specific code samples below:

1) If you are using the .NET control you set the Language property. For example:


SmartZone2.Reader.CharacterSet.Language = Language.WesternEuropean;

2) If you are using the ActiveX control you set the CharacterSetLanguage property. For example:


SmartZone1.CharacterSetLanguage = SZ_WesternEuropeanLanguages
Question

How do I change between machine print and hand print recognition in the SmartZone v2 SDK?

Answer

Please refer to the specific code samples listed below:

1) If you are using the .NET control the Classifier property is set as follows according to the type of recognition you are performing (MachinePrint or HandPrint).


SmartZone2.Reader.Classifier = Classifier.MachinePrint;
 
SmartZone2.Reader.Classifier = Classifier.HandPrint;
 

2) If you are using the ActiveX control the Classifier property is set as follows according to the type of recognition you are performing (MachinePrint or HandPrint).


SmartZone1.Classifier = SZ_ClassifierMachinePrint

SmartZone1.Classifier = SZ_ClassifierHandPrint