Barcode Xpress for .NET Core v13.9 - Updated
Search for Specific Barcode Types
Developer Guide > How To > Use the Barcode Scanner REST API > Search for Specific Barcode Types

By default, the Barcode Scanner REST API processes provides images using the default barcode scanning parameters and searches for most 1D barcodes. When searching for 2D barcodes, unusual barcode configurations, or barcodes in damaged or distorted images, you may need to provide alternatives to the default search parameters. The Barcode Scanner API Reference provides the full list of available parameters. The examples below show how to use some of the most commonly used options.

Specifying Barcode Types

When creating a Barcode Scanner process, an array of barcode types can be provided to instruct the barcode scanner on which specific barcode types to search for:

{
  "input": {
    "source": {
      "fileId": "ek5Zb123oYHSUEVx1bUrVQ"
    },
    "barcodeTypes": [
        "qrCodeBarcode", "code39Barcode"
    ]
  },
  "minSecondsAvailable": 60
}

This is necessary to search for 2D barcode types like QR Codes and PDF-417 barcodes. Even when only scanning for 1D barcodes you can increase performance and scanning speed by restricting the set of barcodes to be scanned for to only the ones you are interested in or expect to find in your images.

Scan Distance

By default, the Barcode Scanner REST API will only scan every 5th line of pixels along each axis of barcode detection in order to maximize performance. For images with very small barcodes or heavily damaged barcodes, you could reduce this scanning distance to increase scanning accuracy at the cost of scanning speed.

{
  "input": {
    "source": {
      "fileId": "ek5Zb123oYHSUEVx1bUrVQ"
    },
    "scanDistance": 1
  },
  "minSecondsAvailable": 60
}
Is this page helpful?
Yes No
Thanks for your feedback.