Leggi il codice a barre Data Matrix usando C#

Questo breve tutorial descrive come leggere il codice a barre Data Matrix usando C#. All the details are present in this article, such as a reference to the library required to develop a Data Matrix code reader in C#, a list of steps, and the sample code. Some library options will be discussed to customize the code in order to retrieve information from the Data Matrix image.

Steps for scanning Data Matrix codes using C#

  1. Set up the environment to use Aspose.BarCode for .NET to read a Data Matrix.
  2. Define the path to the Data Matrix code image file.
  3. Apply a license to read the Data Matrix image, as it requires a license.
  4. Create an instance of the BarCodeReader object, passing the input file name and DecodeType as DataMatrix.
  5. Definisci il più alto quality level per leggere immagini difficili
  6. Scan the image with the defined parameters and retrieve all the barcodes in the image.
  7. Analyze all barcodes, one at a time.
  8. Print the barcode text, the barcode type, and the image region from which the barcode was read.

These steps describe the development of a Data Matrix scanner using C#. Include the required library modules, load the necessary license to read Data Matrix barcodes, and create a BarCodeReader object by setting the input image path and the decode type to DataMatrix. Set the quality level to maximum to read the most difficult images, read all barcodes from the uploaded image, and display all barcode data.

Code for the Data Matrix reader using C#

The sample code above demonstrates the process to scan a Data Matrix code using C#. Note that if you have multiple Data Matrix codes in the image, you can use the default quality instead of HighQuality. È disponibile un’opzione per impostare un timeout di riconoscimento per evitare blocchi, applicare checksum per verificare immagini corrotte e utilizzare la funzionalità di abort per annullare le scansioni a lunga durata.

Questo articolo spiega il processo di scansione di Data Matrix. To generate the Data Matrix code, refer to the article Generate Data Matrix Barcode using C#.

 Italiano