Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

jordao76/nbarcodes

Open more actions menu

Repository files navigation

NBarCodes

NuGet version AppVeyor build License

NBarCodes is a .NET library to generate common one-dimensional barcodes. Supported barcode types include Code 128, Code 39, Standard 2 of 5, Interleaved 2 of 5, EAN-13, EAN-8, UPC-A, UPC-E and Postnet.

Quick intro

NBarCodes

using NBarCodes;

...

var settings = new BarCodeSettings {
  Type = BarCodeType.Code128,
  Data = "NBarCodes"
};

var generator = new BarCodeGenerator(settings);

using (var barcodeImage = generator.GenerateImage()) {

  // use the generated barcodeImage

}

The BarCodeSettings object holds the barcode information. This class has many properties that affect the rendering of the barcode, like the barcode type, the data to render, bar measures, text position and colors. Required properties are simply Type, for the barcode type, and Data, for the data to render. The BarCodeGenerator class is used to generate the right barcode from the provided barcode settings.

A BarCodeFormatException can be thrown if the settings provided have errors for the target barcode. The settings can be checked before calling GenerateImage with the method TestRender on the BarCodeGenerator class.

License

Licensed under the MIT license.

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.