Aspose.Barcode for Cloud API conforms to most modern barcode standards and specifications and allows user to create and read barcodes in any language including .NET, Java, PHP, Ruby, Rails, Python, jQuery and many more. User can use it with any language or platform that supports REST. (Almost all platforms and languages support REST and provide native REST clients to work with REST APIs).This article covers how to generate a barcode and save as TIFF, JPEG, PNG, EMF, BMP and GIF formats in Java. User can check Working with Barcode Generation for other languages.
http://www.aspose.com/docs/display/barcodecloud/Working+with+Barcode+Generation
User need to send a GET request to generate barcodes on local disk. Following topics describe the supported barcode types, and process to create barcodes in detail.
Generate Barcodes using Java REST
User can set any text and supported type in the following URI to create a new barcode.
http://api.aspose.com/v1.1/barcode/generate?text=Text for new barcode image&type=QR
Following is the list of optional parameters for this URI. All or specific parameters can be used as needed.
format – Used to set the required image format. If not specified, PNG is used.
resolutionX – Used to set the resolution along the X-axis in DPI.
resolutionY – Used to set the resolution along the Y-axis in DPI.
dimensionX – Used to set the width of the barcode unit (bar or space).
dimensionY – Used to set the height of the barcode unit (for 2D barcodes).
After building the URI, user need to go through the following steps:
Set App SID and App Key and sign the URI.
See section 1 of the following code and Sign URI method for more details.
http://www.aspose.com/docs/display/rest/REST+API+Methods
Send a GET request to Aspose for Cloud service.
See section 2 of the following code and ProcessCommand method for more details.
http://www.aspose.com/docs/display/rest/REST+API+Methods
Save output barcode image to disk.
See section 3 of the following code and SaveStreamToFile method for more details.
http://www.aspose.com/docs/display/rest/REST+API+Methods
To view the code visit the following link:
http://www.aspose.com/blogs/aspose-products/aspose-barcode-product-family/archive/2014/02/27/generate-barcode-images-in-java-using-aspose.barcode-for-cloud.html
Generate Barcodes using Java SDK
If user want to use our Java SDK to create a new barcode, user can download the following SDK from Aspose for Cloud SDK for Java. In order to use the Java SDK, user need to perform following steps:
https://github.com/asposeforcloud/Aspose_Cloud_SDK_For_Java
Set base product URI, App SID and App Key.
See section 1 of the following code.
Create object of the BarCodeBuilder class and call the Save method.
See section 2 of the following code.
To view the code visit the following link:
http://www.aspose.com/blogs/aspose-products/aspose-barcode-product-family/archive/2014/02/27/generate-barcode-images-in-java-using-aspose.barcode-for-cloud.html