Before starting the programming, please download the PDF417EncodeSDK/NET from Aipsys.com
1. Constants
1.1. Encoding
PDF_BINARY = 0;
PDF_TEXT = 1;
PDF_NUMERIC = 2;
1.2. Error correction Level
1~8
2. Class and description
public ImageEncoder()
public System.Drawing.Bitmap Encode2Image()
public bool Encode2ImageFile(string filename)
public bool RegisterPDF417Encoder(string strMail, string strRegCode)
public System.Drawing.Color BackgroundColor { set; get; }
public int BarHeight { set; get; }
public int BarWidth { set; get; }
public int Columns { set; get; }
public bool Compact { set; get; }
public int Encoding { set; get; }
public int ErrorCorrectionLevel { set; get; }
public System.Drawing.Color ForegroundColor { set; get; }
public string MacroAddresse { set; get; }
public int[] MacroFileId { set; get; }
public string MacroFileName { set; get; }
public long MacroFileSize { set; get; }
public bool MacroLastSegment { set; get; }
public int MacroSegment { set; get; }
public int MacroSegmentCount { set; get; }
public string MacroSender { set; get; }
public string MacroTimeStamp { set; get; }
public int Margin { set; get; }
public int Resolution { set; get; }
public int Rows { set; get; }
public string TextData { set; get; }
3. Samples
3.1. Encode to image
ImageEncoder bc = new ImageEncoder();
bc.TextData="http://www.aipsys.com";
bc.Resolution = 1;
bc.Compact = false;
bc.Margin = 20;
bc.ErrorCorrectionLevel=2;
bc.Encoding=ImageEncoder.PDF_BINARY ;
bc.Columns=3;
bc.Rows=3;
bc.BarHeight = 6;
bc.BarWidth = 4;
bc.BackgroundColor = Color.White;
bc.ForegroundColor = Color.Black;
pictureBox1.Image = bc.Encode2Image();
3.2. Encode to image file
ImageEncoder bc = new ImageEncoder();
bc.TextData="http://www.aipsys.com";
bc.Resolution = 1;
bc.Compact = false;
bc.Margin = 20;
bc.ErrorCorrectionLevel=2;
bc.Encoding=ImageEncoder.PDF_BINARY ;
bc.Columns=3;
bc.Rows=3;
bc.BarHeight = 6;
bc.BarWidth = 4;
bc.BackgroundColor = Color.White;
bc.ForegroundColor = Color.Black;
bc.Encode2ImageFile("c:\\pdf417Test.gif");