.NET QR Code Generator SDK Library
Generate, draw QR Code 2D barcode images for Visual C#, VB.NET, ASP.NET projects
Download .NET Barcode Generator Free Evaluation
Purchase .NET Barcode Generator Suite License
"For a new project, I'd try some barcode tools and compare them. I have to say your barcode toolkit is more flexible than other toolkits on the market."
- Norris Wilson, US

Generating & Printing QR Code in .NET, C#, ASP.NET, VB.NET using .NET QR Code Barcodes Generator

  • Generate QR Code Barcodes in C#, VB.NET class & console applications
  • Generate QR Code in ASP.NET web applications, webform, website
  • Printing QR Code in .NET Windows Forms applications
  • Create & Print QR Code in Reporting Services & Crystal Reports
  • Compatible with ISO / IEC 18004 (2nd edition 2006-09-01)
  • High quality QRCode Bar Code images in GIF, PNG, JPEG & BITMAP and other formats
  • Entirely developed in C#.NET source codes
  • Mature QRCode barcode generating DLL components used by 1000+ clients






.NET Barcode QR Code Generator Introduction
Top
Generating Barcode QR Code in .NET is one of the functions in OnBarcode's .NET Barcode Generators, which supports creating & printing QR-Code and 30+ other linear & 2D bar codes for C#, VB.NET & ASP.NET applications.
OnBarcode develops several .NET Barcode Generation components for different .NET development environments:

.NET QR Code Generator - Barcode QR-Code Introduction

QR Code, also known as Denso Barcode, QRCode, Quick Response Code, is a matrix code (or two-dimensional bar code) created by Japanese corporation Denso-Wave in 1994. The "QR" is derived from "Quick Response", as the creator intended the code to allow its contents to be decoded at high speed.

.NET QR Code Generation - QR-Code Valid Data Scope

.NET QR Code Generator encodes:
  • numeric data (digits 0 - 9)
  • alphanumeric data (digits 0 - 9; upper case letters A -Z; nine other characters: space, $ % * + - . / : )
  • byte data (default: ISO/IEC 8859-1)
  • Kanji characters
How to Generate & Print QR Code in Visual Studio C# or VB.NET Class?
Top
Generating barcode QR Code in C# Class example (C# QR Code Generator Complete Demo Source Code):
   QRCode qrcode = new QRCode();
qrcode.Data = "0123456789";
qrcode.X = 3;

// Generate QR-Code and encode barcode to gif format
qrcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Gif;
qrcode.drawBarcode("C://c#-qrcode.gif");

// Print QR-Code to C# Bitmap object
Bitmap qrcodeBitmap = qrcode.drawBarcode();
Generating barcode QR Code in VB.NET Class example (VB.NET QR Code Generator Complete Demo Source Code):
   Dim qrcode As OnBarcode.Barcode.QRCode
qrcode = New OnBarcode.Barcode.QRCode()
qrcode.Data = "0123456789"
qrcode.X = 3

' Generate QR-Code and encode barcode to png format
qrcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png
qrcode.drawBarcode("C://vbnet-qrcode.png")

' Print QR-Code to vb.net Bitmap object
Dim qrcodeBitmap As Bitmap
qrcodeBitmap = qrcode.drawBarcode()
How to Create & Draw QR-Code Image in ASP.NET aspx or Html Pages Without ASP.NET Barcode Controller?
Top
  • Under demo package, copy barcode folder and its contents to your IIS, and create a new virtual directory.
  • Restart IIS, navigate to http://YourDomain:Port/barcode/qrcode.aspx?DATA=0123456789.
  • To create barcode QR-Code image in html or aspx pages, you can insert a image tag (img) into your page.
    For example, <img src="http://YourDomain:Port/barcode/qrcode.aspx?DATA=0123456789" />
How to Create & Encode Barcode QR-Code to Image File (GIF, JPEG, PNG, BMP)?
Top
Creating QR-Code image in C# Class example:
   QRCode qrcode = new QRCode();
qrcode.Data = "0123456789";
qrcode.X = 3;

// Create QR-Code and encode barcode to Jpeg format
qrcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
qrcode.drawBarcode("C://csharp-qrcode.jpg");
Creating QR-Code image in VB.NET Class example:
   Dim qrcode As OnBarcode.Barcode.QRCode
qrcode = New OnBarcode.Barcode.QRCode()
qrcode.Data = "0123456789"
qrcode.X = 3

' Create QR-Code and encode barcode to Jpeg format
qrcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg
qrcode.drawBarcode("C://vbnet-qrcode.jpg")
In Visual Studio C# & VB.NET, How to Draw & Print Barcode QR Code to .NET Graphics, Stream & Bitmap Objects?
Top
To draw & print barcode QR-Code to C# objects:
   public void drawBarcode(Graphics graphics);

public void drawBarcode(string filename);

public Bitmap drawBarcode();

public void drawBarcode(Stream fileStream);
To draw & print barcode QR-Code to VB.NET objects:
   Public Sub drawBarcode(ByRef graphics As Graphics)

Public Sub drawBarcode(ByVal filename As String)

Public Function drawBarcode() As Bitmap

Public Sub drawBarcode(ByRef fileStream As Stream)
Generating & Printing Barcode QR Code Using .NET Barcode WinForms Controller
Top
  1. Add OnBarcode.Barcode.WinForms.dll to .net project reference.
  2. Add .NET Barcode to .NET Visual Studio Toolbox.
    1. Right click .NET Visual Studio Toolbox, select menu Choose Items...
    2. In "Choose Toolbox Items" form, click button "Browse...", and select dll OnBarcode.Barcode.WinForms.dll.
    3. After selection, you will find four items under "Components" section: LinearWinForm, DataMatrixWinForm, PDF417WinForm, and QRCodeWinForm.
Creating & Drawing Barcode QR Code using ASP.NET Barcode Web Form Controller
Top
  1. Add OnBarcode.Barcode.ASPNET.dll to asp.net project reference.
  2. Add .NET Barcode to .NET Visual Studio Toolbox.
    1. Right click .NET Visual Studio Toolbox, select menu Choose Items...
    2. In "Choose Toolbox Items" form, click button "Browse...", and select dll OnBarcode.Barcode.ASPNET.dll.
    3. After selection, you will find four items under "Components" section: LinearWebForm, DataMatrixWebForm, PDF417WebForm, and QRCodeWebForm.
.NET QR Code Generator - Barcode Properties
Top
Category Properties Value Comments
Basic Property: Data
URL: DATA
Type: string
Default: "QRCode"
Barcode value to encode

QRCode Valid Data Char Set:

  • numeric data (digits 0 - 9);
  • alphanumeric data (digits 0 - 9; upper case letters A -Z; nine other characters: space, $ % * + - . / : );
  • byte data (default: ISO/IEC 8859-1);
  • Kanji characters

 
QRCode
Special
Property: ProcessTilde
URL: PROCESS-TILDE
Type: bool
Default: true
Set the ProcessTilde property to true, if you want use the tilde character "~" to specify special characters in the input data. Default is true.
  • 1-byte character: ~0dd/~1dd/~2dd (character value from 000 ~ 255); ASCII character '~' is presented by ~126
    Strings from "~256" to "~299" are unused
  • 2-byte character (Unicode): ~6ddddd (character value from 00000 ~ 65535)
    Strings from "~665536" to "~699999" are unused
  • for GS1 AI Code:
    ~ai2: AI with 2 digits
    ~ai3: AI with 3 digits
    ~ai4: AI with 4 digits
    ~ai5: AI with 5 digits
    ~ai6: AI with 6 digits
    ~ai7: AI with 7 digits
  • ECI: ~7dddddd (valid value of dddddd from 000000 to 999999)
  • SJIS: from ~9ddddd (Shift JIS 0x8140 ~ 0x9FFC and 0xE040 ~ 0xEBBF)
Property: DataMode
URL: DATA-MODE
Type: QRCodeDataMode
Default: QRCodeDataMode.Auto (0)
  • QRCodeDataMode.Auto: It allows encoding all 256 possible 8-bit byte values. This includes all ASCII characters value from 0 to 127 inclusive and provides for international character set support
  • QRCodeDataMode.AlphaNumeric: It allows encoding alphanumeric data (digits 0 - 9; upper case letters A -Z; nine other characters: space, $ % * + - . / : ).
  • QRCodeDataMode.Byte: It allows encoding byte data (default: ISO/IEC 8859-1).
  • QRCodeDataMode.Numeric: It allows encoding numeric data (digits 0 - 9).
  • QRCodeDataMode.Kanji: It allows encoding Kanji characters.
Property: ECL
URL: ECL
Type: QRCodeECL
Default: QRCodeECL.L (0)
QRCode Error Correction Level. Default is QRCodeECL.L (0).
  • QRCodeECL.L (0)
  • QRCodeECL.M (1)
  • QRCodeECL.Q (2)
  • QRCodeECL.H (3)
Property: FNC1
URL: FNC1
Type: FNC1

Default: FNC1.
FNC1_NONE (0)
To encode GS1 compatible QR-Code barcode, you need set FNC1 value to FNC1.FNC1_1ST_POS (1).
Property: StructuredAppend
URL: STRUCTURED-APPEND
Type: bool
Default: false
Set StructuredAppend property to true, then Structured Append is enabled.
Property: SymbolCount
URL: SYMBOL-COUNT
Type: int
Default: 0
the number of total symbols which make the sequence.
Property: SymbolIndex
URL: SYMBOL-INDEX
Type: int
Default: 0
the position of current symbol in the secuence (Start with 0).
Property: Parity
URL: PARITY
Type: int
Default: 0
-
Property: Version
URL: VERSION
Type: QRCodeVersion
Default: QRCodeVersion.V1 (1).
Valid values are from V1 to V40.
Property: Logo Type: System.Drawing.Bitmap
Default: null
A Bitmap object containing logo image
Property: LogoActualSize Type: System.Drawing.SizeF Logo displayed area on QR Code
 
Barcode
Size
Related
Property: AutoResize
URL: AUTO-RESIZE
Type: bool
Default: false
Auto resize the generated barcode image
Property: BarAlignment
URL: BAR-ALIGNMENT
Type: int
Default: 1 (center)
Barcode horizontal alignment inside the image. 0: left, 1: center, 2: right.
Property: UOM
URL: UOM
Type: UnitOfMeasure
Default: PIXEL (0)
Unit of meature for all size related settings in the library.

Valid values:
  • UnitOfMeasure.PIXEL (0)
  • UnitOfMeasure.CM (1)
  • UnitOfMeasure.INCH (2)
Property: X
URL: X
Type: float
Default: 2
Barcode bar module width and height, default is 3 pixel
Property: BarcodeWidth
URL: BARCODE-WIDTH
Type: float
Default: 0.
Barcode image width.

If BarcodeWidth setting is smaller than the barcode required minimum width, the library will automatically reset to barcode minimum width.
Property: BarcodeHeight
URL: BARCODE-HEIGHT
Type: float
Default: 0.
Barcode image height.

If BarcodeHeight setting is smaller than the barcode required minimum height, the library will automatically reset to barcode minimum height.
Property: LeftMargin
URL: LEFT-MARGIN
Type: float
Default: 0.
Barcode image left margin size.
Property: RightMargin
URL: RIGHT-MARGIN
Type: float
Default: 0.
Barcode image right margin size.
Property: TopMargin
URL: TOP-MARGIN
Type: float
Default: 0.
Barcode image top margin size.
Property: BottomMargin
URL: BOTTOM-MARGIN
Type: float
Default: 0.
Barcode image bottom margin size.
Property: Resolution
URL: RESOLUTION
Type: int
Default: 72.
Barcode image resolution in DPI (Dots per inch).
Property: Rotate
URL: ROTATE
Type: Rotate
Default: Rotate.Rotate0 (0).
Valid values:

  • Rotate.Rotate0 (0)
  • Rotate.Rotate90 (1)
  • Rotate.Rotate180 (2)
  • Rotate.Rotate270 (3)
 
Barcode
Colors
Property: BackColor
URL: BACK-COLOR
Type: Color
Default: white
Barcode image background color
Property: ForeColor
URL: FORE-COLOR
Type: Color
Default: black
Barcode image foreground color
 
In WebStream query string, please use int value for Enums, "true" and "false" for bool.
All .NET Barcode Generator Supporting Bar Code Types
Top

Barcode Generator SDK for .NET - Bar Code Types Generation

OnBarcode is a market-leading provider of barcode imaging generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides comprehensive tutorials and how-tos for various linear, 2d barcode information, such as C# in ASP.NET, C# .NET, C# Barcode Encoding, C# Barcode Image, VB.NET in ASP.NET, VB.NET Winforms, VB.NET Barcode Encoding. OnBarcode barcode products are supported by RasterEdge ASP.NET Document Viewer, which supports ASP.NET PDF Viewer, ASP.NET MVC Document Viewer, ASP.NET PDF Editor, MVC PDF Viewer. And provide high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.