In this C# tutorial, you will learn how to generate linear and 2d barcodes in multiple image formats, including raster images and
vector images in your ASP.NET web app and Windows application.
- Barcode image with color settings
- Barcode image with transparent background
- High resolution barcode image for printing
- Multiple raster image formats and vector image formats supported
Here we will show how to set up a barcode generation streaming service in ASP.NET web server for ASP.NET Core and ASP.NET Framework.
After setup completes, you could generate barcodes using URL in web browser or other applications.
The following guide will create an ASP.NET Core Empty for Windows, which allows you to create QR Code and barcodes through URL.
Here are the requirements:
- Visual Studio 2022
- .NET 6.0 SDK
- OnBarcode.Barcode.ASPNETCore.dll for Windows, or OnBarcode.Barcode.ASPNETCore.Skia.dll for Linux, MacOS, non-Windows
Integrating the OnBarcode barcode streaming service into your applications is really a simple task.
What you need do is to pass our dynamic barcode image
generation URL to your web pages
IMG tag, or to your reporting and business appliations that are supporting loading and rendering image through URL.
Using ASP.NET Core web service
- Dynamic barcode image URL for 1D / Linear barcodes: http://localhost:[port]/?DATA=12345678&X=3
- Dynamic barcode image URL for Data Matrix barcodes: http://localhost:[port]/DataMatrix?Data=123ABC
- Dynamic barcode image URL for PDF-417 barcodes: http://localhost:[port]/PDF417?Data=123ABC
- Dynamic barcode image URL for Micro PDF-417 barcodes: http://localhost:[port]/MicroPDF417?Data=123ABC
- Dynamic barcode image URL for QR Code barcodes: http://localhost:[port]/QRCode?Data=123ABC
- Dynamic barcode image URL for Micro QR Code barcodes: http://localhost:[port]/MicroQRCode?Data=123ABC
ASP.NET Framework web service
- Dynamic barcode image URL for 1D / Linear barcodes: http://localhost:[port]/barcode/linear.aspx?DATA=12345678&X=3
- Dynamic barcode image URL for Data Matrix barcodes: http://localhost:[port]/barcode/datamatrix.aspx?Data=123ABC
- Dynamic barcode image URL for PDF-417 barcodes: http://localhost:[port]/barcode/pdf417.aspx?Data=123ABC
- Dynamic barcode image URL for Micro PDF-417 barcodes: http://localhost:[port]/barcode/micro-pdf417.aspx?Data=123ABC
- Dynamic barcode image URL for QR Code barcodes: http://localhost:[port]/barcode/qrcode.aspx?Data=123ABC
- Dynamic barcode image URL for Micro QR Code barcodes: http://localhost:[port]/barcode/micro-qrcode.aspx?Data=123ABC
You can add parameters to the end of url to set linear barcode type, data to encode, customize barcode image settings. More detail,
view barcode parameters setting for each barcode type