This short tutorial describes how to read Data Matrix barcode using Java. You will get details on how to set up the IDE, a list of steps, and sample code for a Data Matrix code scanner using Java. The code customizations will be discussed at the end of the article to create the barcode image with the specified settings.
Steps for the Data Matrix code reader using Java
- Set up the environment to use Aspose.BarCode for Java to read the Data Matrix code.
- Define the path of the image that contains the Data Matrix codes.
- Applica una licenza, poiché la lettura dei codici Data Matrix non è supportata nella versione di prova
- Create the BarCodeReader object by setting the input image file name and the target code type to Data Matrix.
- Set the reading quality to high to handle difficult images.
- Scan the uploaded image to obtain a list of all Data Matrix codes.
- Scroll through each barcode in the list and display its parameters, including the encoded text.
These steps summarize the process for developing a Data Matrix scanner using Java. Import the necessary modules from the library, instantiate the license to handle Data Matrix barcodes, initialize the BarCodeReader to read Data Matrix codes only from the provided image, and set high quality to work with difficult images. Leggi tutti i codici a barre Data Matrix dall’immagine e visualizza il testo di tutti.
Codice per il lettore Data Matrix in Java
Use this sample code to develop a simple Data Matrix barcode scanner in Java. For a quick detection, define the recognition region in the image and set a recognition timeout to avoid code hangs. Potresti considerare di verificare le informazioni di fiducia/qualità di lettura dei risultati per impostare un livello di fiducia per il testo rilevato.
This article helps with reading Data Matrix codes from an image. To generate a Data Matrix code, refer to the article Generate Data Matrix barcode with Java.