Common Causes of Unreadable Barcodes
You are pointing the camera at the code and it's inside the rectangle but it just doesn't scan? This page lists a number of reasons why this might be happening.
Unsupported Symbology (Barcode Type)
Although STRICH supports all commonly used symbologies, there are a lot of different barcode types out there. It could be that you are trying to scan a barcode that STRICH does not support. Please refer to the SDK documentation for a list of supported symbologies.
If the barcode type you are trying to scan is not supported, please let us know. We are keen to support your use case.
Symbology not Configured
The most common cause of a barcode not being recognized is that the symbology is not configured.
Symbologies are configured using the symbologies property of the engine configuration. You can and typically will configure multiple symbologies to be recognized.
Example 1: Detect Code 128 symbology
const cfg = { selector: "#barcodeReader", engine: { symbologies: ["code128"] } };
Example 2: Detect all EAN/UPC symbologies
const cfg = { selector: "#barcodeReader", engine: { symbologies: ["ean13", "upca", "ean8", "upce"] } };
If you are unsure about the symbology of the barcodes you want to scan, you can try our Demo App and select All Symbologies and try to scan your barcode.
Blurry, Out of Focus Camera Image
STRICH requires the barcode to be focused (sharp). A small amount of blur will still work, but will make decoding less reliable. Blurry images are typically caused by poor auto-focus of the camera, or obstructions.
Example: camera focuses on network cable instead of barcodes.
Bad Print Quality
Ink spread or seepage will make the bars lose contrast and in some cases merge into each other, making the barcodes unreadable.
Example: Poor print quality causing low contrast and merging bars.
Low Contrast
The light and dark elements of the barcode must be clearly distinguishable. Using the flashlight (where supported) can help here.
Example: low contrast due to insufficient lighting
Orientation Issues
1D barcodes need to be oriented roughly horizontally or vertically in the viewfinder to be read. Our engine does not read diagonally oriented barcodes.
Horizontal orientation works well. | Vertical orientation works as well. |
2D barcodes can be oriented in any way.
Perspective Distortion
The library expects the camera to be positioned above the barcode, so it is read at a straight angle. A little bit of angle is ok, but there are limits.
Example: QR code mounted on canister, camera not centered
Insufficient Quiet Zone
1D and 2D barcodes typically require a quiet zone around them. This is a blank area that separates the barcode from other elements.
Example: missing quiet zone on the left side of the QR code
Your barcode still can't be read? Please contact our support team via the Customer Portal and we'll be happy to take a look.
Shorter/Longer than Configured Maximum Length
Some 1D barcode symbologies are fixed-length, i.e. they always encode the same number of digits. For example, the EAN-13 barcode encodes 13 digits, hence the name.
Other symbologies are variable-length, they can encode a variable number of characters or digits. For these symbologies, a minimum and a maximum length can be configured.
These are the variable-length symbologies supported by STRICH:
If your barcodes are longer or shorter than the default configured maximum/minimum length, the barcode will not be read, and you will have to configure a lower minimum or higher maximum length, using the minLen and maxLen fields.
Example: Increasing maximum length for Code 128 barcodes
The configuration below increases the maximum length for Code 128 barcodes from the default (32) to 48, and sets the minimum length to 48 also.
{ selector: "#barcodeReader", engine: { symbologies: [{ name: "code128", maxLen: 48, minLen: 48 }] } }