.Net Integration (.Net SDK)

A .Net Barcode SDK is also bundled in the ConnectCode PDF417 Barcode Font package. This SDK can be bundled in your applications if you have purchased the necessary distribution licenses.

Library Name

PDF417.dll

Namespace

ConnectCode.BarcodeFonts2D

Class Name

PDF417

Requirements

.Net 2.0 and onwards

Constructor

PDF417(String data, int rowHeight, int columns, int errorlevel, int truncate);

This is the constructor for the PDF417 barcode. It is used for initializing the PDF417 barcode.

  • data : The data input string to be encoded as a barcode.
  • columns : Number of Columns in the PDF417 barcode. 1..30 or 0 for Automatic
  • errorlevel : The Error Correction Level. 0..8 or -1 for Automatic
  • truncate : 0 for non truncated PDF417 barcode. 1 for truncated.

Functions

Function NameDescription

String Encode();
This function will encode the barcode based on the parameters specified in the constructor. The result will be returned as a string.
int LengthExceeded();
The Encode() function might return an empty output string due to invalid inputs or if the length of the data exceeded the length specified by the PDF417 specifications. A call to this function after the Encode() function will allow you to determine whether the data length has exceeded.
int GetColumns();
During the creation of the PDF417 barcode, if the number of columns used is "Automatic", the font library will automatically determine the optimal columns. This function can be called after the Encode() function to return the number of columns that is determined by the library.
int GetErrorLevel();
During the creation of the PDF417 barcode, if the error correction level used is "Automatic", the font library will automatically determine the optimal error correction level. This function can be called after the Encode() function to return the error correction level that is determined by the library.

Sample Usage (C#)

Using ConnectCode.BarcodeFonts2D;
.
.
.
PDF417 barcode = new PDF417("12345678",3,0,-1,0);                
String result = barcode.Encode();
Font font = new Font("CCodePDF417_S3", 2);
richTextBox1.Text = outputstr;
richTextBox1.SelectAll();
richTextBox1.SelectionFont = font;

Sample Visual Studio Project

  • Name - ConnectCode Encoder
  • Solution Name - ConnectCode.sln
  • Language - C#
  • Requirements - .Net 2.0 and onwards, Visual Studio 2010, 2012, 2015, 2017, or 2019 and onwards.