Articles in this section
Category / Section

How to read Intelligent Mail Barcode

1 min read

ZXing (zebra crossing) is an open-source tool to decode barcodes within images that fall under the Apache 2.0 license. It allows users to scan most of the 1D and 2D barcodes. Barcode OPX is used to optimize the working of ZXing. This enhanced library read the intelligent Mail Barcode (IBM) and returns the barcode value and type.

Steps to read Intelligent Mail Barcode (IMB) programmatically:

  1. Create a new C# Windows Forms application project.

Create a Windows Application project

  1. To use the Barcode Reader feature in applications, add the references to the following set of assemblies:
  • Syncfusion.BarcodeReader.OPX
  • zxing
  1. Include the following namespaces in Form1.cs file.
    // [C# Code]
    using Syncfusion.BarcodeReader.OPX;
    

 

' [VB Code]
Imports Syncfusion.BarcodeReader.OPX

 

  1. Use the following code snippet to read Intelligent Mail Barcode programmatically.
    // [C# Code]
    string filePath = "IMBBarcode.png";
    //Read barcode
    BarcodeResult result = BarcodeReader.ScanBarcode(filePath);
    if(result!=null)
        txtResult.Text += "Barcode Type: " + result.BarcodeType + " " + "Text: " + result.Text + "\r\n";
    else
        MessageBox.Show("Barcode could not be detected", "Barcode Reader", MessageBoxButtons.OK);
    

 

' [VB Code]
Dim filePath As String = "IMBBarcode.png"
Dim result As BarcodeResult = BarcodeReader.ScanBarcode(filePath)
If result IsNot Nothing Then
    txtResult.Text += "Barcode Type: " & result.BarcodeType & " " & "Text: " + result.Text & vbCrLf
Else
    MessageBox.Show("Barcode could not be detected", "Barcode Reader", MessageBoxButtons.OK)
End If

 

A complete working sample can be downloaded from BarcodeReaderSample.zip.

By executing the program, you will get the barcode type and values as follows.

barcode

Refer here to learn more about Barcode Reader OPX.

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied