Create and Manipulate BarCode using Java Cloud API

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 accurate. 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, a very low error rate, which is extremely cost-effective and can assist employers with lowering overhead and cutting down on training time and labor. Among several benefits of using BarCode, specified below are some other useful features for adopting the BarCode approach.

  • Inventory control improves.
  • Barcodes are inexpensive to design and print.
  • Data obtained through barcodes is available rapidly.
  • Simplify Tracking with Continued Serial Numbers
  • Eliminate Data Entry Errors
  • Improve Efficiency
  • Automatic Identification

The API is capable of parsing popular raster image formats. For further details, please visit Supported File Formats.

Generate a 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

  • Codabar
  • Code11
  • Code39Standard
  • Code39Extended
  • Code93Standard
  • Code93Extended
  • Code128
  • GS1Code128
  • EAN8
  • EAN13
  • EAN14
  • SCC14
  • SSCC18
  • UPCA
  • UPCE
  • ISBN
  • ISSN
  • ISMN
  • Standard2of5
  • Interleaved2of5
  • Matrix2of5
  • ItalianPost25
  • IATA2of5
  • ITF14
  • ITF6
  • MSI
  • VIN
  • DeutschePostIdentcode
  • DeutschePostLeitcode
  • OPC
  • PZN
  • Code16K
  • Pharmacode
  • DataMatrix
  • QR
  • Aztec
  • Pdf417
  • MacroPdf417
  • AustraliaPost
  • Postnet
  • Planet
  • OneCode
  • RM4SCC
  • DatabarOmniDirectional
  • DatabarTruncated
  • DatabarLimited
  • DatabarExpanded
  • SingaporePost
  • GS1DataMatrix
  • AustralianPosteParcel
  • SwissPostParcel
  • PatchCode
  • DatabarExpandedStacked
  • DatabarStacked
  • DatabarStackedOmniDirectional
  • MicroPdf417
  • GS1QR
  • MaxiCode
  • Code32
  • DataLogic2of5
  • DotCode
  • DutchKIX
  • UpcaGs1Code128Coupon
  • UpcaGs1DatabarCoupon
  • CodablockF
  • GS1CodablockF

cURL command

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>"

Request URL

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

Java

The following code snippet can be used to generate a BarCode image and store it over Cloud Storage.

Hello World BarCode image

Recognize BarCode from a 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

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>"

Request URL

https://api.aspose.cloud/v3.0/barcode/index.png/recognize?Type=all&ChecksumValidation=Off&DetectEncoding=false&Preset=HighQuality

Read Barcode from External Image URL