VintaSoft Barcode .NET SDK v10.0
readBarcodes Method
Vintasoft.Barcode Namespace > WebBarcodeReaderJS type : readBarcodes Method
Instance of WebImageJS class that defines web image.
Function that will be executed if request is executed successfully.
Here is function prototype "function __success(data)".
The data parameter has the following properties:
Function that will be executed if request is failed.
Here is function prototype "function __error(data)".
The data parameter can be:
  1. An object with following properties:
    • errorMessage: Error message.
    • blocked: Indicates that the requested action is blocked by another request.
    if exception is catched inside web service.
  2. Otherwise, jqXHR object.
Sends an asynchronous request to a server for reading barcodes from web image.
Syntax
var instance = new Vintasoft.Barcode.WebBarcodeReaderJS(service);
var value; // Type: any
value = instance.readBarcodes(image, successFunc, errorFunc);
function readBarcodes( 
   image : object,
   successFunc : object,
   errorFunc : object
) : any;

Parameters

image
Instance of WebImageJS class that defines web image.
successFunc
Function that will be executed if request is executed successfully.
Here is function prototype "function __success(data)".
The data parameter has the following properties:
  • results: Array of barcode recognition results.
    Result of recognition is an object with following properties:
    • barcodeType: Barcode type.
    • value: Barcode value.
    • hexValue: Barcode value in hex representation.
    • confidence: Barcode confidence.
    • readingQuality: Barcode reading quality.
    • threshold: Image threshold which was applied to an image during barcode recognition.
    • region: Image region where barcode is found. Image region has the following properties:
      • angle: Angle, in degrees, relative to vector to vector (1,0).
      • leftTop: A left-top coordinates of bounding rectangle.
      • leftBottom: A left-bottom coordinates of bounding rectangle.
      • rightTop: A right-top coordinates of bounding rectangle.
      • rightBottom: A right-bottom coordinates of bounding rectangle.
    • additionalInfo: An array that contains the custom barcode properties. Each array value contains the following properties:
      • Key: Property name.
      • Value: Property value represented by a string.
    • test: result of barcode print quality test.
      It can be ISO15415 barcode print quality test:
      • decode: Decode value and grade.
      • maxReflectance: A max reflectance, in percents of reflectance value and grade.
      • minReflectance: A min reflectance, in percents of reflectance value and grade.
      • symbolContrast: Symbol contrast value and grade.
      • modulation: Modulation value and grade.
      • scanGrade: Scan grade and value.
      • axialNonuniformity: Axial nonuniformity value and grade.
      • gridNonuniformity: Grid nonuniformity value and grade.
      • unusedErrorCorrection: Unused error correction value and grade.
      • reflectanceMargin: Reflectance margin value and grade.
      • quietZone: Quiet zone, value in percents, that requires barcode symbology specification and grade.
      • distortionAngle: Distortion angle of barcode matrix value and grade.
      • additionalGrades: Array of additional grades that depends from barcode symbology.
      • fixedPatternDamage: Fixed pattern damage value and grade.
      • codewordYield: Efficiency with which linear scans can recover data from a two-dimensional multi-row symbol value and grade.
      • codewordPrintQualityModulation: Codeword print quality value and grade based on codeword modulation for a two-dimensional multi-row symbol.
      • codewordPrintQualityDefects: Codeword print quality value and grade based on codeword defects for a two-dimensional multi-row symbol.
      • codewordPrintQualityDecodability: Codeword print quality value and grade based on codeword decodability for a two-dimensional multi-row symbol.
      • codewordPrintQuality: Codeword print quality value and grade for a two-dimensional multi-row symbol.
      • startPattern: A result of ISO15516 Start/RAP pattern test for multi-row symbologies (PDF417/MicroPDF417).
      • centerPattern: A result of ISO15516 Center/RAP pattern test for multi-row symbologies (MicroPDF417).
      • stopPattern: A result of ISO15516 Stop/RAP pattern test for multi-row symbologies (PDF417/MicroPDF417).
      OR it can be:
      • tests: Array of ISO15416 barcode print quality test.
        ISO15416 barcode print quality test contain:
        • decode: Decode value and grade.
        • maxReflectance: A max reflectance, in percents of reflectance value and grade.
        • minReflectance: A min reflectance, in percents of reflectance value and grade.
        • globalThreshold: A global threshold (GT), in percents of reflectance value and grade.
        • symbolContrast: Symbol contrast value and grade.
        • minEdgeContrast: A minimum edge contrast (ECmin), in percents of reflectance value and grade.
        • modulation: Modulation value and grade.
        • defects: Defects value and grade.
        • decodability: Decodability value and grade.
        • scanGrade: Scan grade and value.
errorFunc
Function that will be executed if request is failed.
Here is function prototype "function __error(data)".
The data parameter can be:
  1. An object with following properties:
    • errorMessage: Error message.
    • blocked: Indicates that the requested action is blocked by another request.
    if exception is catched inside web service.
  2. Otherwise, jqXHR object.
Browser Compatibility
9
5
11
5
See Also

Reference

WebBarcodeReaderJS type