Barcode Not Recognized

This article was translated from English: Does it need improvement?
Translated
View the article in English

Sometimes, despite appearing visually correct, barcodes may not be recognized during scanning.

Possible Causes

  1. Unsupported Barcode Encoding : While IronBarcode supports various barcode formats, it may not recognize certain encodings.
  2. Low Resolution : A barcode image with low resolution or noisy image quality reduces the chances of successful reading.
  3. Barcode Positioning : Barcodes positioned near the edges of documents or images might not be detected. Barcodes that are partly cut off may also not be read properly.
  4. Imperfect Barcode Image : Issues such as noisy backgrounds, glare, blurriness, or low lighting can hinder barcode readability.

Solutions

Fortunately, IronBarcode offers solutions to address these issues. Follow the troubleshooting steps below:

1. Specify Barcode Encoding

If you know the specific barcode encoding, set the ExpectBarcodeTypes property in the BarcodeReaderOptions class. This improves the chance the barcodes in the image will be detected and read.

请注意Not all encodings are supported. Check the Supported Barcode Formats article for more information.

2. Apply Image Correction Filters

IronBarcode includes filters that help correct low-resolution or imperfect images for better barcode reading. Learn more in the Image Correction article.

3. Specify Barcode Location

For barcodes located at the edges of images or documents, specifying the barcode location can improve detection. This also enhances performance by reducing the scanning area. Use the IronSoftware.Drawing.Rectangle object in the CropArea property of the BarcodeReaderOptions class. Learn how in the Crop Region Guide.

4. File Conversion

Converting PDF documents to uncompressed image formats like TIFF or PNG can help in making undetectable barcodes readable. Similarly, converting pixelated JPG files can improve read quality.

5. Increase DPI

For PDF documents, increasing DPI can sharpen barcodes and enhance readability. Set the DPI property in the PdfBarcodeReaderOptions class.

请注意Increasing DPI may affect the read performance. Be sure to find the ideal setting that can balance the barcode readability wthout sacrificing too much performance

Helpful Articles

If you need further assistance, submit an Engineering Request.

Curtis Chau
技术作家

Curtis Chau 拥有卡尔顿大学的计算机科学学士学位,专注于前端开发,精通 Node.js、TypeScript、JavaScript 和 React。他热衷于打造直观且美观的用户界面,喜欢使用现代框架并创建结构良好、视觉吸引力强的手册。

除了开发之外,Curtis 对物联网 (IoT) 有浓厚的兴趣,探索将硬件和软件集成的新方法。在空闲时间,他喜欢玩游戏和构建 Discord 机器人,将他对技术的热爱与创造力相结合。

准备开始了吗?
Nuget 下载 1,935,276 | 版本: 2025.11 刚刚发布