.NET interface to diQRcode.
| Class | Description |
|---|---|
| QRcode | Create a QR code image. |
| Enumeration | Description |
|---|---|
| Ecc | Error correction code level |
| ImageType | Image type |
| Options | Option flags |
Create a QR code image.
System.Object
diQRcodeNet.QRcode
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public class QRcodeThe QRcode type exposes the following members.
| Name | Description |
|---|---|
| CreateGif | Create a GIF file of a QR code [deprecated]. |
| CreateGifInUtf8 | Create a GIF file of a QR code, using UTF-8 encoding [deprecated]. |
| CreateImage | Create an image file of a QR code. |
| CreateImageInUtf8 | Create an image file of a QR code, using UTF-8 encoding. |
| CreatePdf | Create a PDF file of a QR code. |
| CreatePdfInUtf8 | Create a PDF file of a QR code, using UTF-8 encoding. |
| DllInfo | Get information about the core diQRcode DLL. |
| ErrorLookup | Look up description for error code. |
| NetVersion | Return the version of this .NET module. |
| Version | Get version number of core diQRcode DLL. |
Create a GIF file of a QR code [deprecated].
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static int CreateGif(
string outFile,
string inputStr,
int nPixelsPerModule = 0,
Ecc level = Ecc.M,
string paramStr = "",
Options options = Options.Default
)Name of output GIF file to be created.
Text input to be encoded (ANSI characters only).
Number of pixels per module (default = 2 ppm)
Error correction level (default = M)
Optional parameter string. Set as "margin=N" to change
the margin to N modules (default=4).
Set as Escaped to indicate #-escaped sequences in the input string.
Int32
Zero on success, or a nonzero error
code.
Deprecated. Use QRCode.CreateImage
int n = QRcode.CreateGif("hello.gif", "hello world");
if (n != 0) Console.WriteLine("Error: {0}", QRcode.ErrorLookup(n));QRcode Class
diQRcodeNet Namespace
Create a GIF file of a QR code, using UTF-8 encoding [deprecated].
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static int CreateGifInUtf8(
string outFile,
string inputStr,
int nPixelsPerModule = 0,
Ecc level = Ecc.M,
string paramStr = "",
Options options = Options.Default
)Name of output GIF file to be created.
Text input to be encoded.
Number of pixels per module (default = 2 ppm)
Error correction code level (default = M)
Optional parameter string. Set as "margin=N" to change
the margin to N modules (default=4).
Option flags.
Int32
Zero on success, or a nonzero error
code.
Any non-ASCII characters in inputStr will be encoded in
UTF-8 before processing. Deprecated. Use QRCode.CreateImageInUtf8
QRcode Class
diQRcodeNet Namespace
Create an image file of a QR code.
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static int CreateImage(
string outFile,
string inputStr,
ImageType imageType = ImageType.Gif,
int nPixelsPerModule = 0,
int margin = 0,
Ecc level = Ecc.M,
Options options = Options.Default
)Name of output image file to be created.
Text input to be encoded (ANSI characters only).
Image type (GIF/SVG) (default = GIF).
Number of pixels per module (default = 2 ppm).
Size of margin in modules (default = 4 modules).
Error correction level (default = M).
Set as Escaped to indicate #-escaped sequences in the input string.
Int32
Zero on success, or a nonzero error
code.
int n = QRcode.CreateImage("hello.gif", "hello world");
if (n != 0) Console.WriteLine("Error: {0}", QRcode.ErrorLookup(n));
n = QRcode.CreateImage("hello.svg", "hello world", ImageType.Svg);
if (n != 0) Console.WriteLine("Error: {0}", QRcode.ErrorLookup(n));QRcode Class
diQRcodeNet Namespace
Create an image file of a QR code, using UTF-8 encoding.
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static int CreateImageInUtf8(
string outFile,
string inputStr,
ImageType imageType = ImageType.Gif,
int nPixelsPerModule = 0,
int margin = 0,
Ecc level = Ecc.M,
Options options = Options.Default
)Name of output image file to be created.
Text input to be encoded.
Image type (GIF/SVG) (default = GIF).
Number of pixels per module (default = 2 ppm)
Size of margin in modules (default = 4 modules).
Error correction code level (default = M)
Option flags.
Int32
Zero on success, or a nonzero error
code.
Any non-ASCII characters in inputStr will be encoded in
UTF-8 before processing.
n = QRcode.CreateImageInUtf8("zz-utf8.svg", "中国", ImageType.Svg);QRcode Class
diQRcodeNet Namespace
Create a PDF file of a QR code.
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static int CreatePdf(
string outFile,
string inputStr,
int nPixelsPerModule = 0,
Ecc level = Ecc.M,
int nPageWidth = 0,
int nPageHeight = 0,
int nX = 0,
int nY = 0,
Options options = Options.Default
)Name of output PDF file to be created.
Text input to be encoded.
Number of pixels per module (default = 2 ppm)
Error correction code level (default = M)
Width of PDF page in pixels (default = 0 => set width to fit QRcode image).
Height of PDF page in pixels (default = 0 => set height to fit QRcode image).
X-coordinate in pixels of bottom-left of QRcode image (default = 0 => at left side).
Y-coordinate in pixels of bottom-left of QRcode image (default = 0 => at bottom).
Option flags.
Int32
Zero on success, or a nonzero error
code.
n = QRcode.CreatePdf("hello0.pdf", "Hello world!");
n = QRcode.CreatePdf("helloA4.pdf", "Hello world!", nPixelsPerModule: 6, nPageWidth: 595, nPageHeight: 842, nX: 230, nY: 380);QRcode Class
diQRcodeNet Namespace
Create a PDF file of a QR code, using UTF-8 encoding.
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static int CreatePdfInUtf8(
string outFile,
string inputStr,
int nPixelsPerModule = 0,
Ecc level = Ecc.M,
int nPageWidth = 0,
int nPageHeight = 0,
int nX = 0,
int nY = 0,
Options options = Options.Default
)Name of output PDF file to be created.
Text input to be encoded.
Number of pixels per module (default = 2 ppm)
Error correction code level (default = M)
Width of PDF page in pixels (default = 0 => set width to fit QRcode image).
Height of PDF page in pixels (default = 0 => set height to fit QRcode image).
X-coordinate in pixels of bottom-left of QRcode image (default = 0 => at left side).
Y-coordinate in pixels of bottom-left of QRcode image (default = 0 => at bottom).
Option flags.
Int32
Zero on success, or a nonzero error
code.
Any non-ASCII characters in inputStr will be encoded in
UTF-8 before processing.
QRcode Class
diQRcodeNet Namespace
Get information about the core diQRcode DLL.
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static string DllInfo()String
String with information including platform core DLL is compiled for:
Win32 or X64.
QRcode Class
diQRcodeNet Namespace
Look up description for error code.
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static string ErrorLookup(
int errCode
)Value of error code to lookup (may be positive or negative)
String
Error message, or empty string if no corresponding error code.
Console.WriteLine(QRcode.ErrorLookup(-39)); // Unable to encodeQRcode Class
diQRcodeNet Namespace
Return the version of this .NET module.
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static string NetVersion()String
Version string, e.g. "03.05.00"
QRcode Class
diQRcodeNet Namespace
Get version number of core diQRcode DLL.
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public static int Version()Int32
Version number in form Major * 10000 + Minor * 100 + Release
For example, version 1.2.3 would return 10203
QRcode Class
diQRcodeNet Namespace
Error correction code level
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public enum Ecc| Member name | Description |
|---|---|
| M | EC level M (default) |
| L | EC level L |
| Q | EC level Q |
| H | EC level H |
Image type
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
public enum ImageType| Member name | Description |
|---|---|
| Gif | Output image as a GIF file (default) |
| Svg | Output image as an SVG file |
Option flags
Namespace: diQRcodeNet
Assembly: diQRcodeNet (in diQRcodeNet.dll) Version:
4.0.0.36607 (4.0.0.1)
[FlagsAttribute]
public enum Options| Member name | Description |
|---|---|
| Default | Default options. |
| Escaped | Input string contains #-escaped sequences. |
| Base64 | Encode image output formatted as base64 text. |
| NoNameCheck | Do not check filename extension against file type. |
Created: 2025-10-20 20:20:52
Copyright (C) 2025 D.I. Management Services Pty Ltd t/a CryptoSys https://cryptosys.net