Please firstly find a jar file named pqScan.BarcodeReader.jar in the downloaded package and copy it into your project library folder. Then, add this library control to your Java classpath. Now, it is installed successfully. You may have a quick evaluation by using the flexible APIs and Java class demo code below.
Using Java to Read Aztec Code
Due to the fact that Aztec Code is an area efficient two-dimensional barcode type that is able to encode large amounts of data information, not requiring a surrounding blank "quiet zone", it is now widely used in many applications. For instance, it be generated as a bar code symbol from a font and used in Microsoft Excel, Word and reporting application like Crystal Reports. Compared with other 2D bar codes, Aztec Code has the potential to use less space.
On the market, many barcode scanners for Java do not support reading and decoding barcode symbol like Aztec Code, especially for large symbol. However, ours can do this work. pqScan Java SDK for Barcode Scanning supports reading bar code from common raster image files and Java AWT image object at fast speed. And it tests well with large size Aztec Code barcode.
On this guide page, you will be guided to easily install Java Aztec Code Scanner into Java application and read this 2D barcode type using robust Java APIs and demo codes.
Now we will introduce you six flexible Aztec Code barcode reading methods. Please read explainations and choose the suitable API to read and decode Aztec Code on your image file or Java AWT image object.
// Read and decode Aztec code from image file at disk. public static BarcodeResult[] Scan(String filename); // Scan and detect Aztec code from BufferedImage object. public static BarcodeResult[] Scan(BufferedImage image); // Read and recognize Aztec code from InputStream object. public static BarcodeResult[] Scan(InputStream imageStream); // Scan Aztec code only from local image file. public static BarcodeResult[] Scan(String filename, BarCodeType barType); // Read Aztec code only from BufferedImage object. public static BarcodeResult[] Scan(BufferedImage image, BarCodeType barType); // Decode Aztec code only from InputStream object. public static BarcodeResult[] Scan(InputStream imageStream, BarCodeType barType);
By copying the following code example to your Java class programming, you can add highly accurate Aztec Code barcode reading function to Java application. All data information of Aztec Code 2d barcode will be decoded and output quickly.
import com.pqscan.barcodereader.BarcodeResult; import com.pqscan.barcodereader.BarcodeScanner; import com.pqscan.barcodereader.BarCodeType; public class ReadAztecCodeDemo { public static void main(String[] args) { try { // Set target barcode symbol type as Aztec code and recognize barcode(s) from image file. BarcodeResult[] results = BarcodeScanner.Scan("C:/sample.jpg", BarCodeType.Aztec); for(int i = 0; i < results.length; i++) { // Output all detected Aztec code barcode(s) data information. System.out.println(results[i].getData() + "--" + results[i].getBarType()); } } catch (Exception e) { e.printStackTrace(); } } }