Generate DatabarExpanded Labels via C#
Create GS1 Databar Expanded, GS1 Databar Expanded Stacked, GS1 DataBar Expanded, GS1 Databar OmniDirectional, GS1 DataBar Stacked, GS1 Databar Stacked OmniDirectional, GS1 DataBar Truncated barcodes in any .NET application using server-side Aspose.BarCode for .NET API.
How to Generate DATABAR Barcode Using C#
In order to create GS1 Databar Expanded, GS1 Databar Expanded Stacked, GS1 DataBar Expanded, GS1 Databar OmniDirectional, GS1 DataBar Stacked, GS1 Databar Stacked OmniDirectional, GS1 DataBar Truncated barcode, we’ll use
API which is a feature-rich, powerful and easy to use barcode API for C# platform. Open
package manager, search for Aspose.BarCode and install. You may also use the following command from the Package Manager Console.
Command
PM> Install-Package Aspose.BarCode
Steps for Generating DATABAR Barcodes in C#
Aspose.BarCode makes it easy for the developers to create DATABAR barcode images in few lines of code.
- Create an instance of BarcodeGenerator class
- Pass DatabarExpanded as a parameter
- Set text to encode as second parameter
- Set image dimensions if required
- Call BarcodeGenerator.Save method to get the DatabarExpanded label
System Requirements
Our APIs are supported on all major platforms and Operating Systems. Before executing the code below, please make sure that you have the following prerequisites on your system.
- Microsoft Windows or a compatible OS with .NET Framework, .NET Standard, COM Interloop for PHP, VBScript, Delphi, C++
- Development environment like Microsoft Visual Studio.
- Aspose.BarCode for .NET library DLL referenced in your project - Install from NuGet using the Download button above
Create DATABAR Barcodes - C#
// The path to the documents directory.
string dataDir = "directoryPath";
// Instantiate object and set differnt barcode properties
BarcodeGenerator generator = new BarcodeGenerator (EncodeTypes.DatabarExpanded, "1234567");
generator.Parameters.Barcode.XDimension.Millimeters = 1f;
// Save the image to your system and set its image format to Jpeg
generator.Save(dataDir + "output.jpg", BarCodeImageFormat.Jpeg);
// Use the relevant EncodeTypes GS1 Databar Expanded, GS1 Databar Expanded Stacked, GS1 DataBar Expanded, GS1 Databar OmniDirectional, GS1 DataBar Stacked, GS1 Databar Stacked OmniDirectional, GS1 DataBar Truncated
Create DatabarExpanded Codes via Free App
About Aspose.BarCode for .NET API
Aspose.BarCode is a barcode reader and generation API. It can easily decode and generate 1D, 2D and postal barcodes of multiple symbologies. Developers can easily integrate it in any barcode generation and scanning application. Moreover, Generated barcodes can easily be exported to different high-quality image formats. Its a standalone library and does not require any additional software installation.Other Supported Barcode Generation Symbologies
Using .NET, One can also generate barcode of different symbologies including.