EasyBarCodeReadMail

Support

Required licenses

EasyBarCode

Recommended images

Any image from the folder Sample Images/EasyBarCode/MailBarCode

Location

Text and Code Reading/EasyBarCodeReadMail

Purpose

This sample program demonstrates how to:

  • Read a mail bar code in an image.

Code highlights

  1. Read the mail bar codes present in the image.

    m_Barcodes = m_Reader.Read(m_Source);
    
  2. Retrieve the text encoded in the i^(th) bar code.

    string text = m_Barcodes[i].Text;
    
  3. Retrieve the j^(th) component (for example the Postal Code or Address in the screenshot) encoded in the i^(th) bar code.

    string composed = m_Barcodes[i].ComponentStrings[j].Key + " : " + m_Barcodes[i].ComponentStrings[j].Value;
    
  4. Draw the position of the i^(th) bar code on the image.

    m_Barcodes[i].Draw(e.Graphics);