Skip to main content
In this scenario, ABBYY FineReader Engine is used to read barcodes. Barcodes may need to be read, for example, for purposes of automatic document separation, for processing documents by a Document Management System, or for indexing and classifying documents. This scenario may be used as part of other scenarios. For example, documents scanned with high-speed production scanners may be separated by means of barcodes, or documents prepared for long-term storage may be placed into archiving Document Management Systems based on the values of their barcodes. When extracting barcodes from texts, the system may detect all barcodes or only barcodes of a certain type with a certain value. The system may get the value of a barcode and calculate its checksum. To obtain the fastest and highest quality results of the barcode recognition:
  1. Use color pictures with an optimal resolution of 300 dpi.
  2. Tune the recognition speed using profiles (see Working with Profiles for details).
Recognized barcode values can be saved into formats most convenient for further processing, for example, into TXT.

Scenario implementation

The code samples provided in this topic are Windows -specific.
Below follows a detailed description of the recommended method of using ABBYY FineReader Engine 12 in this scenario. The suggested method uses processing settings deemed most appropriate for this scenario.
To start your work with ABBYY FineReader Engine, you need to create the Engine object. The Engine object is the top object in the hierarchy of the ABBYY FineReader Engine objects and provides various global settings, some processing methods, and methods for creating the other objects.To create the Engine object, you can use the InitializeEngine function. See also other ways to load Engine object (Win).

C#

C++ (COM)

The most suitable settings can be selected by using the LoadPredefinedProfile method of the Engine object. This method accepts the name of the settings profile being used as an input parameter. For more about profiles, see Working with Profiles.ABBYY FineReader Engine supports 2 variants of settings for this scenario:

C#

C++ (COM)

If you wish to change the settings used for processing, use the corresponding parameter objects. See the Additional optimization section below for more information.
ABBYY FineReader Engine provides a FRDocument object for processing multi-page documents. To load the images of a document and preprocess them, you should create the FRDocument object and add images to it. You can do one of the following:

C#

C++ (COM)

If the BarcodeRecognition profile is loaded, you can use the Process method of the FRDocument object to extract only barcodes. In this case, ABBYY FineReader Engine detects only blocks with barcodes. No other blocks are detected. The recognized barcode blocks can be accessed via the Layout object, which is a subobject of the FRPage object representing a page of the document.To read barcodes of specific type, specify the appropriate parameters of the BarcodeParams object and pass the BarcodeParams object as a parameter of one of the above functions.

C#

C++ (COM)

To save the values of the recognized barcodes to a file, you may use the Export method of the FRDocument object by assigning the FileExportFormatEnum constant as one of the parameters. This scenario can export, for example, to TXT. You may change the default parameters of export using the corresponding export object. Please see Additional optimization for specific tasks below for further information.After you have finished your work with the FRDocument object, release all the resources that were used by this object. Use the IFRDocument::Close method.

C#

C++ (COM)

After finishing your work with ABBYY FineReader Engine, you need to unload the Engine object. To do this, use the DeinitializeEngine exported function.

C#

C++ (COM)

Required resources

You can use the FREngineDistribution.csv file to automatically create a list of files required for your application to function. For processing with this scenario, select in the column 5 (RequiredByModule) the following values: Core Core.Resources Opening Opening, Processing Processing Processing.OCR Processing.OCR, Processing.ICR Processing.OCR.NaturalLanguages Processing.OCR.NaturalLanguages, Processing.ICR.NaturalLanguages Export Export, Processing If you modify the standard scenario, change the required modules accordingly. You also need to specify the interface languages, recognition languages and any additional features which your application uses (such as, e.g., Opening.PDF if you need to open PDF files, or Processing.OCR.CJK if you need to recognize texts in CJK languages). See Working with the FREngineDistribution.csv File for further details.

Additional optimization

These are the sections of the help file where you can find additional information about setting up the parameters for the various processing stages:
  • Extracting and reading barcodes
    • BarcodeParams Object
      This object allows you to set up the barcode analysis and reading parameters.
    • Recognizing Barcodes
      Discusses special cases in barcode recognition and provides hints on working with barcodes.
    • Barcode Types
      The list of barcodes supported in ABBYY FineReader Engine 12 and their brief descriptions.
    • FRDocument Object
      Apart from barcode values, you may need to extract other information contained in document. In this case, you may wish to use the methods of the FRDocument object.
    • PageProcessingParams Object
      This object allows you to set up analysis and recognition parameters for the entire document. Using this object, you may specify whether barcode values should be recognized. The barcode reading parameters are accessible via the BarcodeParams and DetectBarcodes properties of the PageAnalysisParams subobject.
    • Working with Layout and Blocks
      You can also mark barcode blocks manually and specify their analysis and reading parameters. This section provides detailed information on working with blocks.
  • Working with the recognized barcode values
    • BarcodeBlock Object
      The Text and BarcodeText properties of this object contain the value of the barcode obtained through recognition. The other properties of this object can be used to get the type of the barcode, its orientation, and other parameters.
  • Export

See also

Basic Usage Scenarios Implementation