Skip to content

TyKonKet/BarcodeGenerator

Repository files navigation

Barcode Generator

Barcode generator on .NET Standard 1.3

NuGet

NuGet

Usage

Include the BarcodeGenerator NuGet package in your app:

PM> Install-Package TyKonKet.BarcodeGenerator

Program.cs

Now you can generate all the barcodes you want as you wish:

using TyKonKet.BarcodeGenerator;

internal static class Program
{
    private static void Main()
    {
        var bc = new Barcode(o =>
        {
            o.Encode = Encodes.Code93;
            o.Height = 30;
            o.Scale = 10;
            o.Margins = 2;
            o.BackgroundColor = SKColors.Transparent;
            o.Color = SKColors.Black;
            o.Font = "Arial";
            o.FontStyle = SKFontStyle.Normal;
            o.DrawText = false;
        });
        bc.Encode("THE-BARCODE");
        // you can use {barcode} keyword in the file path
        bc.Export("barcodes_path/bc_{barcode}.png");
        bc.Dispose();
    }
}

Encoders

  • EAN-13
  • UPC-A
  • ISBN
  • EAN-8
  • CODE39
  • CODE93
  • CODE128

About

Barcode generator on .NET Standard 1.3

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages