In this article, we are going to discuss the details on how to create Barcode using Java as well as recognizing the Barcode using the same Java API. We are already familiar that a barcode is an encoding tag or label that is placed on all merchandise that allows computers to track and ring up products much faster and more accurately. Similarly, they can easily be printed and added to items in a timely fashion so that your entire inventory is labeled and tracked immediately. Furthermore, the Barcode offers automatic product identification, extremely fast recognition, and implementation of data at a very low error rate. This approach is extremely cost-effective and can assist employers with lowering overhead and cutting down on training time and labor.
- Barcode Generation API
- Generate Barcode with Specified Dimensions
- Recognize Barcode from a Raster Image
Barcode Generation API
Aspose.BarCode Cloud is a REST API enabling our customers to implement BarCode generation and manipulation capabilities in the programming
The API is capable of parsing popular raster image formats. For further details, please visit Supported File Formats.
Generate Barcode with Specified Dimensions
The quick and easiest way to test our APIs is to use the API reference section. The GetBarcodeGenerate method is used to create BarCode images and it provides a wide range of options to generate the BarCode as per your requirements and related details pertinent to specific parameters are well explained on the API reference page. While generating BarCode, you may specify either of the following types
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=Codabar&Text=Hello%20World&TwoDDisplayText=QR&TextLocation=Above&TextAlignment=Center&TextColor=Blue&FontSizeMode=Auto&Resolution=96&TextSpace=2&Units=Point&SizeMode=Nearest&BarHeight=50&ImageHeight=200&ImageWidth=200&RotationAngle=0&BackColor=White&BorderDashStyle=Solid&SupplementData=EAN8&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
The following code snippet can be used to generate a BarCode image and store it over Cloud Storage.
Recognize Barcode from Raster Image
The API also offers the capabilities to recognize BarCode from raster image files. The image file can be PNG, JPEG, BMP, GIF, TIFF, or EXIF format. The GetBarcodeRecognize method of API enables you to accomplish this requirement. The name field is mandatory and other optional fields provide the capabilities to perform better recognition operations because you can specify the BarCode type information, ChecksumValidation, Encoding, a preset allowing to configure recognition quality and speed, and much more.
curl -X GET "https://api.aspose.cloud/v3.0/barcode/index.png/recognize?Type=all&ChecksumValidation=Off&DetectEncoding=false&Preset=HighQuality" -H "accept: application/json" -H "authorization: Bearer <JWT Token>"
Read Barcode from External Image URL
In this article, we have discussed the steps and related details on how to programmatically create BarCode using Java as well as how to read and recognize an existing BarCode using Java code snippet. You may have noticed that all these operations are performed with a few simple code lines. No additional software download or installation is required and these operations can be accomplished with fewer code lines.
We recommend you visit the following links to learn more about