Barcodes serve as a universal language, allowing businesses to efficiently track and manage their products, streamline checkout processes, and enhance overall operational efficiency. Also, in today’s fast-paced world of retail, logistics, and inventory management, the ability to generate barcodes programmatically is essential. In this article, we are going to discuss the details on how to generate the barcodes in various encodings and how to save Barcode in PNG format using .NET REST API.
BarCode Conversion API
Aspose.BarCode Cloud API provides great capabilities to create, manipulate, and render Linear, 2D, and postal barcodes in the cloud. The API recognizes and generates barcode images in JPEG, TIFF, PNG, BMP, and GIF formats. In order to generate a customized output, you may specify image attributes such as width, height, border style, and output image format. This article further highlights the details related to BarCode processing using Cloud REST API.
Please be noted that all our APIs are password-protected, so before you proceed with their usage, you need to subscribe to an account over Aspose.Cloud dashboard. We also recommend visiting the following links
Control Bars Width
In the recent release versions of Aspose.BarCode Cloud API, we have provided flexibility for Barcode processing and specifically have introduced the feature to control bars reduction value. These values are used to compensate for ink spread during the print operation. Apart from the above-mentioned property, there are a variety of options to control the rendering of BarCode images.
Code39Standard
cURL command
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=Code39Standard&Text=Sample%20Text&TextColor=Yellow&FontSizeMode=Auto&Resolution=130&SizeMode=None&BackColor=Blue&BarColor=Gold&BorderColor=Gold&BorderWidth=4&BorderDashStyle=DashDotDot&BorderVisible=true&EnableChecksum=Yes&BarWidthReduction=2&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>
Code93Extended
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=Code93Extended&Text=Sample%20Text&TextColor=Yellow&FontSizeMode=Auto&Resolution=130&SizeMode=None&BackColor=Blue&BarColor=Gold&BorderColor=Gold&BorderWidth=4&BorderDashStyle=DashDotDot&BorderVisible=true&EnableChecksum=Yes&BarWidthReduction=2&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
Code128
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=Code128&Text=Sample%20Text&TextColor=Yellow&FontSizeMode=Auto&Resolution=130&SizeMode=None&BackColor=Navy&BarColor=Gold&BorderColor=Gold&BorderWidth=4&BorderDashStyle=DashDotDot&BorderVisible=true&EnableChecksum=Yes&BarWidthReduction=2&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
EAN8
cURL command
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=EAN8&Text=123456&TextColor=Purple&FontSizeMode=Auto&Resolution=260&SizeMode=None&BackColor=Gold&BarColor=Navy&BorderColor=Navy&BorderWidth=4&BorderDashStyle=DashDotDot&BorderVisible=true&EnableChecksum=Yes&BarWidthReduction=1&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
EAN13
cURL command
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=EAN13&Text=123456&TextColor=Purple&FontSizeMode=Auto&Resolution=260&SizeMode=None&BackColor=Yellow&BarColor=Navy&BorderColor=Navy&BorderWidth=4&BorderDashStyle=DashDotDot&BorderVisible=true&EnableChecksum=Yes&BarWidthReduction=1&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
SCC14
cURL command
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=SCC14&Text=123456&TextColor=Pink&FontSizeMode=Auto&Resolution=130&SizeMode=None&BackColor=Green&BarColor=Gold&BorderColor=Gold&BorderWidth=4&BorderDashStyle=Dash&BorderVisible=true&EnableChecksum=Default&BarWidthReduction=1&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
UPCA
cURL command
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=UPCA&Text=12345678&TextColor=Navy&FontSizeMode=Auto&Resolution=260&SizeMode=None&BackColor=Pink&BarColor=Purple&BorderColor=Purple&BorderWidth=4&BorderDashStyle=Dash&BorderVisible=true&EnableChecksum=Default&BarWidthReduction=1&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
VIN
VIN barcode where the text is displayed on top of the barcode, with BarWidthReduction value as 1 and resolution is set to 130 dpi.
cURL command
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=VIN&Text=12345678&TextLocation=Above&TextColor=Navy&FontSizeMode=Auto&Resolution=130&SizeMode=None&BarColor=Purple&BorderColor=Purple&BorderWidth=4&BorderDashStyle=Dot&BorderVisible=true&EnableChecksum=Default&BarWidthReduction=1&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
PZN
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=PZN&Text=12345678&TextLocation=Above&TextAlignment=Left&TextColor=Maroon&FontSizeMode=Auto&Resolution=130&SizeMode=None&BarColor=Olive&BorderColor=Olive&BorderWidth=4&BorderDashStyle=Dot&BorderVisible=true&EnableChecksum=Default&BarWidthReduction=1&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
DataMatrix
cURL command
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=DataMatrix&Text=Sample%20Text&TextLocation=Above&TextAlignment=Center&TextColor=Yellow&FontSizeMode=Auto&Resolution=260&SizeMode=None&BackColor=gray&BarColor=Gold&BorderColor=Gold&BorderWidth=4&BorderDashStyle=Solid&BorderVisible=true&EnableChecksum=Default&BarWidthReduction=1&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
QR
cURL Command
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=QR&Text=Sample%20Text&TextLocation=Below&TextAlignment=Center&TextColor=Navy&FontSizeMode=Auto&Resolution=260&SizeMode=None&BackColor=azure&BarColor=Navy&BorderColor=Gray&BorderWidth=4&BorderDashStyle=Solid&BorderVisible=true&EnableChecksum=Default&BarWidthReduction=1&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
Other than the type of BarCodes specified above, the Aspose.BarCode Cloud API provides support for many more barcode types.
Useful links.
- Evaluate Aspose.BarCode Cloud API.
- Aspose.BarCode Cloud API documentation
- Available SDKs
- Aspose.BarCode Cloud family homepage.
Free online Apps
Want to see the API in action!
Without setting up the environment, you may try exploring the features currently being offered by Aspose.BarCode using Aspose.BarCode cross platform Apps.
Related Articles
We highly recommend visiting following links to learn about: