A simple way to generate Aztec barcode

Posted by Godsky under C# on 12/23/2012 | Points: 10 | Views : 2534 | Status : [Member] | Replies : 2
1. Constants
1.1 CorrectionLevel
1~35
1.2 Configuration
CONFIGURATION_15X15_COMPACT 0
CONFIGURATION_19X19 1
CONFIGURATION_19X19_COMPACT
CONFIGURATION_23X23
CONFIGURATION_23X23_COMPACT
CONFIGURATION_27X27
CONFIGURATION_27X27_COMPACT
CONFIGURATION_31X31
CONFIGURATION_37X37
CONFIGURATION_41X41
CONFIGURATION_45X45
CONFIGURATION_49X49
CONFIGURATION_53X53
CONFIGURATION_57X57
CONFIGURATION_61X61
CONFIGURATION_67X67
CONFIGURATION_71X71
CONFIGURATION_75X75
CONFIGURATION_79X79
CONFIGURATION_83X83
CONFIGURATION_87X87
CONFIGURATION_91X91
CONFIGURATION_95X95
CONFIGURATION_101X101
CONFIGURATION_105X105
CONFIGURATION_109X109
CONFIGURATION_113X113
CONFIGURATION_117X117
CONFIGURATION_121X121
CONFIGURATION_125X125
CONFIGURATION_131X131
CONFIGURATION_135X135
CONFIGURATION_139X139
CONFIGURATION_143X143
CONFIGURATION_147X147
CONFIGURATION_151X151 34

1.3 Configure Type
CONFIGURATION_ANY
CONFIGURATION_COMPACT
CONFIGURATION_FULL

1.4 Encoding
ENC_NORMAL
ENC_BINARY

2. Class description

public ImageEncoder()
public System.Drawing.Bitmap Encode2Image()
public bool Encode2ImageFile(string filename)
public bool RegisterAztecEncoder(string strMail, string strRegCode)

public virtual bool AutoConfigurate { set; get; }
public virtual System.Drawing.Color BackGroundColor { set; get; }
public virtual int Configuration { set; get; }
public virtual int ConfigurationType { set; get; }
public virtual int Encoding { set; get; }
public virtual int ErrorCorrectionLevel { set; get; }
public virtual System.Drawing.Color ForeGroundColor { set; get; }
public virtual int Margin { set; get; }
public virtual int ModuleSize { set; get; }
public virtual bool ProcessTilde { set; get; }
public virtual int Rune { set; get; }
public virtual bool StructuredAppend { set; get; }
public virtual int StructuredAppendCounter { set; get; }
public virtual int StructuredAppendIndex { set; get; }
public virtual string TextData { set; get; }

3. Samples
3.1 Encode to image
ImageEncoder iee = new ImageEncoder();
iee.AutoConfigurate = true;
iee.Rune = -1;
iee.Encoding = ImageEncoder.ENC_NORMAL;
iee.ErrorCorrectionLevel = 23;
iee.Configuration = ImageEncoder.CONFIGURATION_91X91;
iee.ConfigurationType = ImageEncoder.CONFIGURATION_ANY;
iee.ProcessTilde = false;
iee.Margin = 10;
iee.ModuleSize = 4;
iee.StructuredAppend = false;
iee.StructuredAppendCounter = 0;
iee.StructuredAppendIndex = 0;
iee.TextData = "http://www.aipss.com";
pictureBox1.Image = iee.Encode2Image();

3.2 Encode to image file
ImageEncoder iee = new ImageEncoder();
iee.AutoConfigurate = true;
iee.Rune = -1;
iee.Encoding = ImageEncoder.ENC_NORMAL;
iee.ErrorCorrectionLevel = 23;
iee.Configuration = ImageEncoder.CONFIGURATION_91X91;
iee.ConfigurationType = ImageEncoder.CONFIGURATION_ANY;
iee.ProcessTilde = false;
iee.Margin = 10;
iee.ModuleSize = 4;
iee.StructuredAppend = false;
iee.StructuredAppendCounter = 0;
iee.StructuredAppendIndex = 0;
iee.TextData = "http://www.aipss.com";
iee.Encode2ImageFile("c:\\qrtest.png");


if you need the SDK , please download it from aipsys.com




Responses

Posted by: Mariah on: 8/22/2013 [Member] Starter | Points: 25

Up
0
Down
thanx for your great resource! before this i always used barcode generator for asp.net http://www.keepautomation.com/guide/aspnet_barcode_generator.html ,it's an easy way do create barcode.

Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Makaveiljojo on: 1/27/2014 [Member] Starter | Points: 25

Up
0
Down
One .NET barcode suite is able to generate barcode with different platform, including C#, ASP.NET, VB.NET. etc
http://www.keepautomation.com/products/net_barcode/


Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response