Before start the programming, please download DatamatrixEncodeNet SDK from aipsys.com
constants:
SymbolSize:
SymbolRectAuto = -2
SymbolSquareAuto=-1
Symbol10x10=0
Symbol12x12=1
Symbol14x14=2
Symbol16x16=3
Symbol18x18=4
Symbol20x20=5
Symbol22x22=6
Symbol24x24=7
Symbol26x26=8
Symbol32x32=9
Symbol36x36=10
Symbol40x40=11
Symbol44x44=12
Symbol48x48=13
Symbol52x52=14
Symbol64x64=15
Symbol72x72=16
Symbol80x80=17
Symbol88x88=18
Symbol96x96=19
Symbol104x104=20
Symbol120x120=21
Symbol132x132=22
Symbol144x144=23
Symbol8x18=24
Symbol8x32=25
Symbol12x26=26
Symbol12x36=27
Symbol16x36=28
Symbol16x48=29
Mode:
Ascii=0
C40=1
Text=2
X12=3
Edifact=4
Base256=5
AsciiGS1=6
Programming samples:
.........
using aipsys.datamatrix.encoder;
..........
Encode to Bitmap and show it:
ImageEncoder iee = new ImageEncoder();
ie.Margin = 4;
ie.PixelSize = 3;
ie.Scheme = 0;
ie.SymbolSize = -2;
string s = "http://www.aipsys.com";
pictureBox1.Image = iee.Encode2Image(s);
Encode and save the barcode image to file:
ImageEncoder ie = new ImageEncoder();
ie.Margin = 4;
ie.PixelSize = 3;
ie.Scheme = 0;
ie.SymbolSize = -2;
ie.Encode2ImageFile("http://www.aipsys.com", "c:\\test.gif");