How to split the pages flow by multiple bar-code types including «Code 39 without asterisk» type in Recognition Server 4?

Recognition Server provides an option to divide a pages flow into documents automatically by bar-codes of various types. The automatic bar-code detection works for all bar-code types except for «Code 39 without asterisk» bar-codes. «Code 39 without asterisk» bar-codes are detected and recognized only if this type is specified at the Document Separation tab  - see «Start a new document from page with barcode → Code 39 without asterisk».

In this case a separation script should be used together with a bar-code «Code 39 without asterisk» set as a separation bar-code type.

Below you will find a separation script sample which divides the pages flow into documents by bar-codes of Code 128 and Code 39 without asterisk types. The script is developed in JScript:

var code128counter = 0;
var code39counter = 0;
if (BarcodeBlocks.count > 0)
// Making sure that the script will run only for pages with bar-codes
    for (i = 0; i < BarcodeBlocks.count; ++i)
    //count the number of Code39 without asterisk bar-codes
        if (BarcodeBlocks.Item(i).BarcodeType == 3)
    if (code39counter == 0)
    // if there are no Code 39 without asterisk bar-codes in the page
    // verify if there is a Code128 bar-code in the page
        for (i = 0; i < BarcodeBlocks.count; ++i)
            if (BarcodeBlocks.Item(i).BarcodeType == 7)
if (code128counter > 0)
//create a new document if there is a Code128 bar-code in the page
    IsStartingPage = true;

Have more questions? Submit a request



Please sign in to leave a comment.