// Create QR-Code barcode object in C# QRCode barcode = new QRCode(); // Set QR-Code barcode value in C# barcode.CodeText = "QRCode in C#"; // Set QR Code module size barcode.X = 4; // Set QR Code quiet zone barcode.BottomMargin = 16; barcode.LeftMargin = 16; barcode.RightMargin = 16; barcode.TopMargin = 16; //Set QR Code error correction level barcode.ECL = QRCodeECL.L; // Set QR-Code drawing image format to PNG in C# barcode.Format = System.Drawing.Imaging.ImageFormat.Png; // Generate QR-Code barcode & encode to the png image in C# barcode.drawBarcode("C://barcode-qrcode-csharp.png");
' Create QR-Code barcode object in VB.NET Dim barcode As New QRCode() ' Set QR-Code barcode value in VB.NET barcode.CodeText = "QRCode in VB.NET" ' Set QR Code module size barcode.X = 4 ' Set QR Code quiet zone barcode.BottomMargin = 16 barcode.LeftMargin = 16 barcode.RightMargin = 16 barcode.TopMargin = 16 'Set QR Code error correction level barcode.ECL = QRCodeECL.L ' Set QR-Code drawing image format to PNG in VB.NET barcode.Format = System.Drawing.Imaging.ImageFormat.Png ' Generate QR-Code barcode & encode to the png image in VB.NET barcode.drawBarcode("C://barcode-qrcode-vbnet.png")
Barcode properties | HTTP Parameters | Default | Comments |
---|---|---|---|
CodeText | code-text | "" | QR Code has a very large amounts of data capacity. The encodable character set includes
|
GraphicsUnit | graphics-unit | GraphicsUnit.Pixel | The unit of measurement for all size related settings.
|
X | x | 1 | The narrow bar module width of QR Code and the default value of X is 1 pixels.
This value of X dimension may need to be increased to enhance the readability of the barcode if the barcode scanners could not read the barcode with small X dimension. |
LeftMargin | left-margin | 0 | The property to set the distance between the symbol and the left margin of a barcode image. |
RightMargin | right-margin | 0 | The property to set the distance between the symbol and the right margin of a barcode image. |
TopMargin | top-margin | 0 | The property to customize the space between the symbol and the top margin on a barcode image |
BottomMargin | bottom-margin | 0 | The property to change the space between the symbol and the bottom margin on a barcode image |
Resolution | resolution | 72 | This property set the resolution in DPI of a barcode image to be drawn, and the default value that is set to printer is 72 pixels. You can adjust the value to get a custom resolution barcode image. |
Rotate | rotate | 0 | The Rotate property allows you changing the angle of a barcode. The valid values are:
|
Format | format | ImageFormat.Png | This is a method that is used for exporting barcode to different type of image formats. It allows developers generate barcode in formats like:
|
ProcessTilde | process-tilde | false | Set the processTilde property to true, if you want use the tilde character "~" to specify special characters in the input data. Default is false.
~NNN: is used to represent the ASCII character with the value of NNN. NNN is from 000 - 255. |
DataMode | data-mode | QRCodeDataMode.Auto |
|
ECL | ecl | QRCodeECL.L | The Error Correction Level of QR Code symbol. QR Code uses the Reed-Solomon error correction with four levels of error correction (referred to as L, M, Q, and H) allowing recovery of
|
ECI | eci | 3 | The Extended Channel Interpretations of QR Code. ECI is a protocol used to interpret the default character set to different output data stream. |
FNC1 | fnc1 | 0 (none) | FNC1 mode is used to specify data formats. When the FNC1 is in the first position, it assigns the data formatted on the basis of GS1 General Specifications. When it is in the second position, it assigns the data formatted on the basis of a specific industry application. |
ApplicationIndicator | application-indicator | 0 | The Application Identifier. It is used to identify the data type in a symbol and is primarily used in GS1 symbologies. |
StructuredAppend | structured-append | false | If true, then Structured Append is enabled and allows the encoding of the data being splited from a message over a number of QR Code symbols. |
SymbolCount | symbol-count | 1 | Set the number of total symbols which make the sequence. |
SymbolIndex | symbol-index | 1 | Set the position of current symbol in the secuence (Start with 0). |
Parity | parity | 0 | The Parity Data |
Version | version | 1 | There are forty versions, from V1 to V40, of QR Code which is in accordance with forty sizes of the symbol.
|