J4L-MicroPDF417 for .NET

Copyright J4L (http://www.java4less.com) 2006.

Introduction

The package J4L-MicroPDF417 contains the class you need to create Micro PDF 417 barcodes within your .NET applications.

MicroPDF417 is a 2D barcoding symbology based on PDF417. Micro PDF 417 has been specifically designed to provide even greater space efficiency for small item marking applications than the standard PDF 417 symbology.

Micro PDF 417 has the following encoding methods:

The maximum data capacity of micro PDf symbols is:

Micro PDF 417 barcodes can have 1 to 4 columns of data and they support a predefined set of formats with fixed error correction levels. The following table shows the available formats:

 

Columns / Rows
Capacity (binary encoding)
Capacity (text encoding)
Capacity (numeric encoding)
FORMAT_1X11
3
6
8
FORMAT_1X14
7
12
17
FORMAT_1X17
10
18
26
FORMAT_1X20
13
22
32
FORMAT_1X24
18
30
44
FORMAT_1X28
22
38
55
FORMAT_2X8
8
14
20
FORMAT_2X11
14
24
35
FORMAT_2X14
21
36
52
FORMAT_2X17
27
46
67
FORMAT_2X20
33
56
82
FORMAT_2X23
38
64
93
FORMAT_2X26
43
72
105
FORMAT_3X6
6
10
14
FORMAT_3X8
10
18
26
FORMAT_3X10
15
26
38
FORMAT_3X12
20
34
49
FORMAT_3X15
27
46
67
FORMAT_3X20
39
66
96
FORMAT_3X26
54
90
132
FORMAT_3X32
68
114
167
FORMAT_3X38
82
138
202
FORMAT_3X44
97
162
237
FORMAT_4X4
8
14
20
FORMAT_4X6
13
22
32
FORMAT_4X8
20
34
49
FORMAT_4X10
27
46
67
FORMAT_4X12
34
58
85
FORMAT_4X15
45
76
111
FORMAT_4X20
63
106
155
FORMAT_4X26
85
142
208
FORMAT_4X32
106
178
261
FORMAT_4X38
128
214
313
FORMAT_4X44
150
250
366

 

 

RMicroPDF417 supports:


Installation

After unzipping the file you have received or downloaded, you must add rmicropdf417.dll to your IDE ( for example, Visual Studio.Net or #develop).

Whenever you use one of our controls don't forget to import the namespace:

[C#]

using J4L.MicroPDF417;

...

 

[VBNET]

Imports J4L.MicroPDF417

.....

 

Examples

The product contains a sample application (and its c# source code) which demonstrates the use of the windows forms control. The source code of the sample application is located in the Example subdirectory .

 

The API

 

The windows forms control can be placed on a form with your IDE by just adding our controls to the toolbox. You can also programmatically add controls to your form with the following code:

[C#]

using J4L.MicroPDF417;

...

// define variable
MicroPDF417 bc;
// create instance of the objact
bc = new MicroPDF417();
// define position and size of the object on the form
bc.Location = new System.Drawing.Point(8, 8);
bc.Size = new System.Drawing.Size(368, 176);

// set barcode properties
bc.Code="12345678";
bc.EncodingMode=MicroPDF417.PDF_NUMERIC;
bc.PDFPreferredFormat=MicroPDF417.FORMAT_1X11;

// add it to the form "this" is the current form.
this.Controls.Add(bc);

[VBNET]

Imports J4L.MicroPDF417

.....

' define variable
dim bc as MicroPDF417
'create instance of the objact
bc = new MicroPDF417()
'define position and size of the object on the form
bc.Location = new System.Drawing.Point(8, 8)
bc.Size = new System.Drawing.Size(368, 176)

' set barcode properties
bc.Code="12345678"
bc.EncodingMode=MicroPDF417.PDF_NUMERIC
bc.PDFPreferredFormat=MicroPDF417.FORMAT_1X11

'add it to the form "me" is the current form.
me.Controls.Add(bc)

If you need to created a image file you can do it like this:

[C#]

using J4L.MicroPDF417;

...

// define variable
MicroPDF417 bc;
// create instance of the objact
bc = new MicroPDF417();

// set barcode properties
bc.Code="12345678";
...

// set size and write to file
bc.Size = new System.Drawing.Size(368, 176);
bc.saveToFile("file.gif","GIF");

[VBNET]

Imports J4L.MicroPDF417

......

' define variable
Dim bc as MicroPDF417
'create instance of the objact
bc = new MicroPDF417()

' set barcode properties
bc.Code="12345678"
....

' set size and write to file
bc.Size = new System.Drawing.Size(368, 176)
bc.SaveToFile("file.gif","GIF")

 

You can also use the paintBarcode method for rendering the barcode onto an external Graphics object:

[C#]

using J4L.MicroPDF417;
using System.Drawing;

...

// create image and graphics
Bitmap inMemoryImage =new Bitmap(300,300) ;
Graphics g= Graphics.FromImage(inMemoryImage) ;

// create barcode
MicroPDF417 bc=new MicroPDF417();

// set barcode properties
bc.Code="12345678";
....

// render barcode on "g"
bc.paintBarcode(g);

[VBNET]

Imports J4L.MicroPDF417
Imports System.Drawing

..............

' create image and graphics
dim inMemoryImage as new Bitmap(300,300)
dim g as Graphics = Graphics.FromImage(inMemoryImage)

'create barcode
dim bc as MicroPDF417 =new MicroPDF417()

' set barcode properties
bc.Code="12345678"
...

'render barcode on "g"
bc.paintBarcode(g)

 

API

Methods



Properties