Online Guide

For Using BC.NetCoreBarcodeGenerator.All
Generate 2d & 1d barcodes to raster image formats, Stream, Bitmap, Graphics, and HttpResponse in .NET Core projects.

Guide Overview

With simple integration, you can integrate high-quality barcodes generating features of BC.NetCoreBarcodeGenerator.All into your .NET Core projects development. This comprehensive .NET Core barcode generator library can be used to generate barcodes in C#/VB.NET Core Class Library, .NET Core ASP.NET Web, .NET Core Windows Forms, .NET Core Console App, and .NET Core Test Projects development.

Most popular barcode symbologies are supported, including QR Code, Data Matrix, PDF417, Code 128, Code 39, EAN-13, EAN-8, GS1-128/EAN-128, UPC-A, UPC-E, Codabar, ITF-14, Planet, Postnet, OneCode/Intelligent Mail, and Interleaved 2 of 5.


2d & 1d barcodes can be encoded and output to raster images, Stream, Bitmap, Graphics, and HttpResponse in .NET Core projects. On this page, we provide C# and VB.NET coding examples of how to use BC.NetCoreBarcodeGenerator.All library to generate Code 39 and PDF417 to local raster images in .NET Core Console App. Certainly, you can also generate all supported 1d and 2d barcodes in other .NET Core projects.

PLEASE NOTE: the first character of the barcode will be recognized as "BC.Trial" for the trial package. A demo project is included in our free trial package. Please download a free trial to see more.

.NET Core Barcode Generating - C# & VB.NET Coding Examples

Here, we use the assembly "BC.NetCore21BarcodeGeneratorTrial.All.dll" which is for .NET Core 2.1. In all, four dlls are provided in the package and be used for .NET Core 2.1, 3.1, 5.0, and 6.0.

1. Create a new .NET Core Console App (.NET Core) project (Type: Visual C#);
2. Add your .NET Core project reference to the assembly "BC.NetCore21BarcodeGeneratorTrial.All.dll";
3. "BC.NetCore21BarcodeGeneratorTrial.All.dll" relies on "System.Drawing.Common". So, "System.Drawing.Common" should be added.
    a. Choose "Manage NuGet Packages..." in the "Dependencies" menu to open the "NuGet Package Manager" tab;
    b. Choose "Browse" tab and search the NuGet package "System.Drawing.Common" in the Package source "";
    c. Install the System.Drawing.Common to your .NET Core project.
4. Then, try with the C# code and VB.NET code below.

How to in C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using BC.NetCore21BarcodeGeneratorTrial.All;

namespace BC.NetCore21BarcodeGeneratorTrial.All.Demo
    class Program
        static void Main(string[] args)

        public static void GenerateCode39()
            All1D barcode = new All1D();
            barcode.SetType = LinearType.Code39;
            barcode.SetData = "WWW.BARCODEBC.COM";
            barcode.SetUOM = UnitofMeasurement.Cm;
            barcode.StartStopCharsVisible = false;
            barcode.ApplyCheckDigit = false;           
            barcode.SetDPI = 10;           
            barcode.SetWidetoNarrowXRatio = 2;
            barcode.AutoSize = false;
            barcode.SetColor = System.Drawing.Color.Black;
            barcode.TextColor = System.Drawing.Color.Red;
            barcode.SetFont = new Font("Arial", 20f, FontStyle.Bold);
            barcode.SetTextVisible = true;
            barcode.SetX = 1;
            barcode.SetY = 60;
            barcode.SetLeftSpace = 5;
            barcode.SetRightSpace = 5;
            barcode.SetTopSpace = 5;
            barcode.SetBottomSpace = 5;
            barcode.SetWidth = 30;
            barcode.SetHeight = 10;
            //barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png;
            String Picture = "F://test.png";

        public static void GeneratePdf417()
            Pdf417 barcode = new Pdf417();
            barcode.SetData = "WWW.BARCODEBC.COM";
            barcode.SetEncodingMode = Pdf417EncodingMode.Auto;
            barcode.SetRows = 20;
            barcode.SetColumns = 20;
            barcode.SetX = 5;
            //barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png;
            String Picture = "F://test1.png";

            //In addition to String, you can also output barcode to a Bitmap object, Stream object, Graphics object, HttpResponse object or byte array.

How to in VB.NET

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports BC.NetCore21BarcodeGeneratorTrial.All
Namespace BC.NetCore21BarcodeGeneratorTrial.All.Demo
    Class Program
        Shared  Sub Main(ByVal args() As String)
        End Sub
        Public Shared  Sub GenerateCode39()
            Dim barcode As All1D =  New All1D() 
            barcode.SetType = LinearType.Code39
            barcode.SetData = "WWW.BARCODEBC.COM"
            barcode.SetUOM = UnitofMeasurement.Cm
            barcode.StartStopCharsVisible = False
            barcode.ApplyCheckDigit = False           
            barcode.SetDPI = 10           
            barcode.SetWidetoNarrowXRatio = 2
            barcode.AutoSize = False
            barcode.SetColor = System.Drawing.Color.Black
            barcode.TextColor = System.Drawing.Color.Red
            barcode.SetFont = New Font("Arial", 20f, FontStyle.Bold)
            barcode.SetTextVisible = True
            barcode.SetX = 1
            barcode.SetY = 60
            barcode.SetLeftSpace = 5
            barcode.SetRightSpace = 5
            barcode.SetTopSpace = 5
            barcode.SetBottomSpace = 5
            barcode.SetWidth = 30
            barcode.SetHeight = 10
            'barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png;
            Dim Picture As String =  "F://test.png" 
        End Sub
        Public Shared  Sub GeneratePdf417()
            Dim barcode As Pdf417 =  New Pdf417() 
            barcode.SetData = "WWW.BARCODEBC.COM"
            barcode.SetEncodingMode = Pdf417EncodingMode.Auto
            barcode.SetRows = 20
            barcode.SetColumns = 20
            barcode.SetX = 5
            'barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png;
            Dim Picture As String =  "F://test1.png" 
            'In addition to String, you can also output barcode to a Bitmap object, Stream object, Graphics object, HttpResponse object or byte array.
        End Sub
    End Class
End Namespace

Please Note

In addition to the .NET Core barcode generator library, we also provide a .NET barcode generator library and a .NET PDF barcode generator library. You may click to see more.

What words will you use when looking for a .NET Core barcode generator library on Google? Most in common, users use these words and find our .NET Core barcode generator library, including generate barcode in .NET Core, how to create barcode .net core, how to generate barcode .net core windows application, how to generate barcode c# .net core application, how to generate barcode core web, how to generate barcode core, create barcode .net core free, generate barcode .net core code example, .net core generate barcode api, core generate barcode api, generate qr code in .net core, create qr code .net core, encode qr code .net core, generate data matrix .net core, generate pdf417 .net core, generate code 128 .net core, generate code39 .net core web application, generate ean13 .net core web application, generate upca .net core web, .net core 1d barcode generator, .net core 2d barcode generator, .net core generate 2d barcode image, etc.