.NET Barcode Font Encoder Assembly & Source Code

The IDAutomation .NET Font Encoder Assembly is a font encoder that formats text for IDAutomation barcode fonts in Microsoft .NET. It is free to use with any Developer License purchase to any IDAutomation barcode font package. The licensed version also includes C# and VB .NET source code that may be compiled into your project without the assembly. The following chart summarizes the files provided with compatibility information.

Version 2021 and later of this product contain DLLs signed with SHA256 and strong names. Previous versions, including any demo versions, contain only MD5 signatures.

Distribution FileFolderCompatibility
IDAutomation_<symbology>FontEncoder.cs
C#.NET.NET Standard, Core & Framework
IDAutomation_<symbology>FontEncoder.vb
VB.NET.NET Standard, Core & Framework
IDAutomation.LinearFontEncoder.dll
.NET Standard Assembly.NET Standard & Core
IDAutomation.LinearFontEncoder.dll
.NET 4 Assembly
.NET Framework 4
IDAutomation.LinearFontEncoder.dll
.NET 2 Assembly
.NET Framework 2

Index:

Note: This font encoder is supplied with the purchase of the Developer's License or above of any compatible Barcode Font Package.

Installation and Tutorial

These steps outline the process for setting up the .NET Barcode Font Encoder Assembly & DLL Tool in Visual Studio .NET. The example uses two textboxes: txtDataToEncode to input the data and txtEncodedData to display the encoded data. A command button executes the font encoder and places the txtDataToEncode encoded data into the txtEncodedData textbox. The example uses the IDAutomation.LinearFontEncoder.dll to encode data for a Code 128 barcode in C#.

Barcode encoding app example

  1. Copy the IDAutomation.LinearFontEncoder.dll to the project directory. To use the source code instead of the DLL, copy the source code file that is needed to the project directory.
  2. Create the reference. In Visual Studio .NET, this is accomplished by accessing the Solution Explorer. If Solution Explorer is not visible, select View - Solution Explorer.
  3. To add the assembly DLL as a reference, right-click References in Solution Explorer and choose Add Reference.
    Adding an assembly DLL file to a Visual Studio project.
    To add a source code file instead of the assembly DLL, right-click on the project and choose Add - Existing Item.
    Adding a source code file to a Visual Studio project.
  4. Browse to the file that is needed and select it. It should now appear in your project.
    The IDAutomation .NET Assembly within a Visual Studio project.
  5. In the project, create an object of the class:
    IDAutomation.Linear.FontEncoder FontEncoder = new IDAutomation.Linear.FontEncoder();
  6. Format the data to the font:
    txtEncodedText.Text = FontEncoder.Code128(txtDataToEncode.Text);
  7. Set the encoded data to the barcode font:
    txtEncodedText.Font = new Font("IDAutomationC128L", 12, FontStyle.Regular);
    // NOTE: The Demo font is named IDAutomationSC128L.
  8. After the text is formatted to the font, print or display the text with the appropriate barcode font selected. Be sure to include enough space around the symbol so it may be properly decoded. 
    Barcode encoding example

Code 128 Font Example

C# Example:

IDAutomation.Linear.FontEncoder FontEncoder = new IDAutomation.Linear.FontEncoder();
txtEncodedText.Text = FontEncoder.Code128(txtDataToEncode.Text);
txtEncodedText.Font = new Font("IDAutomationC128L", 12, FontStyle.Regular);
//Demo font is named "IDAutomationSC128L"

VB.NET Example:

Dim FontEncoder As New IDAutomation.Linear.FontEncoder
txtEncodedText.Text = FontEncoder.Code128(txtDataToEncode.Text)
txtEncodedText.Font = new Font("IDAutomationC128L", 12, FontStyle.Regular)
'Demo font is named "IDAutomationSC128L"

Universal Font Example

C# Example:

IDAutomation.Linear.UniversalFontEncoder UniversalFontEncoder = new IDAutomation.Linear.UniversalFontEncoder();
txtEncodedText.Text = UniversalFontEncoder.IDAutomation_Uni_C128(txtDataToEncode.Text, false);
txtEncodedText.Font = new Font("IDAutomation Uni L", 12, FontStyle.Regular);
//Demo font is named "IDAutomationS Uni L"

VB.NET Example:

Dim UniversalFontEncoder As New IDAutomation.Linear.UniversalFontEncoder
txtEncodedText.Text = UniversalFontEncoder.IDAutomation_Uni_C128(txtDataToEncode.Text)
txtEncodedText.Font = new Font("IDAutomation Uni L", 12, FontStyle.Regular)
'Demo font is named "IDAutomationS Uni L"

USPS IMb Example

C# Example:

IDAutomation.Linear.IntelligentMail IntelligentMail = new IDAutomation.Linear.IntelligentMail();
txtEncodedText.Text = IntelligentMail.FontEncode(txtDataToEncode.Text);
txtEncodedText.Font = new Font("IDAutomationIMB", 12, FontStyle.Regular);
//Demo font is named "IDAutomationSIMB"

VB.NET Example:

Dim IntelligentMail As New IDAutomation.Linear.IntelligentMail
txtEncodedText.Text = IntelligentMail.FontEncode(txtDataToEncode.Text)
txtEncodedText.Font = new Font("IDAutomationIMB", 12, FontStyle.Regular)
'Demo font is named "IDAutomationSIMB"

GS1-128 Font Example

C# Example:

IDAutomation.Linear.UniversalFontEncoder UniversalFontEncoder = new
IDAutomation.Linear.UniversalFontEncoder();
txtEncodedText.Text = UniversalFontEncoder.IDAutomation_Uni_C128(txtDataToEncode.Text, true);
txtEncodedText.Font = new Font("IDAutomationGS1 50", 12, FontStyle.Regular);
//Demo font is named "IDAutomationGS1 50 DEMO"

VB.NET Example:

Dim UniversalFontEncoder As New IDAutomation.Linear.UniversalFontEncoder
txtEncodedText.Text = UniversalFontEncoder.IDAutomation_Uni_C128(txtDataToEncode.Text, true)
txtEncodedText.Font = new Font("IDAutomationGS1 50 DEMO", 12, FontStyle.Regular)

GS1 DataBar Font Example

C# Example:

IDAutomation.Linear.DataBar Databar = new IDAutomation.Linear.DataBar();
txtEncodedText.Text = Databar.IDAutomation_DataBar_DataBarStackedOmniDirectional(txtDataToEncode.Text);
txtEncodedText.Font = new Font("IDAutomation DataBar 34", 12, FontStyle.Regular);
//Demo font is named "IDAutomation DataBar 34 DEMO"

VB.NET Example:

Dim DataBar As New IDAutomation.Linear.DataBar
txtEncodedText.Text = DataBar.IDAutomation_DataBar_DataBarStackedOmniDirectional(txtDataToEncode.Text)
txtEncodedText.Font = new Font("IDAutomation DataBar 34", 12, FontStyle.Regular)
'Demo font is named "IDAutomation DataBar 34 DEMO"

Methods and Properties

The methods listed below are available in the IDAutomation.LinearFontEncoder.dll and source code files unless otherwise indicated, and are valid only when used with the font listed in the Font to Use column. All parameters are optional except DataToEncode.

Methods for Linear Barcode Fonts
Barcode Type Methods | Notes
(View Method Descriptions for more information)
Font to Use
(With Purchase Link)
Code 11 Code11 (DataToEncode) IDAutomationC11
Code 128 (Auto Mode) Code128 (DataToEncode, C128 ReturnType, ApplyTilde)
Human Readable text may be created in the font with C128 ReturnType = 6.
Example: Code128("123456789012", 6, 1)
IDAutomationC128
Code 128 (Manual Mode) Consider using Auto Mode for most situations.
Code128a (DataToEncode, C128 ReturnType)
Code128b (DataToEncode, C128 ReturnType))
Code128c (DataToEncode, C128 ReturnType))
IDAutomationC128
Code 39 Code39 (DataToEncode)
Code39Mod43 (DataToEncode, ReturnType)
Code39Ext functions are also provided for extended 39.
IDAutomationC39
Code 93 Code93 (DataToEncode) IDAutomationC93
Codabar Codabar (DataToEncode) IDAutomationCB
EAN-13 EAN13 (DataToEncode) IDAutomationUPCEAN
EAN-8 EAN8 (DataToEncode) IDAutomationUPCEAN
GS1-128 Code128 (DataToEncode, C128 ReturnType, ApplyTilde)
GS1-128 is enabled in Code 128 Auto by setting ApplyTilde to True. Human Readable AIs may be created by setting the C128 ReturnType to 6.
Example: Code128("(12)3456789012", 6, 1)
IDAutomationC128
Interleaved 2 of 5 I2of5 (DataToEncode)
I2of5Mod10 (DataToEncode, ReturnType))
IDAutomationI25
MSI Plessey MSI (DataToEncode, ReturnType) IDAutomationMSI
RM4SCC RM4SCC (DataToEncode) IDAutomationRM
UPC-A UPCa (DataToEncode) IDAutomationUPCEAN
UPC-E UPCe (DataToEncode) IDAutomationUPCEAN
USPS IntelligentMail IMb FontEncode (DataToEncode)
IDAutomationPOSTNET
or IDAutomationIMB
or IDAutomation_Uni
USPS Postnet Postnet (DataToEncode, ReturnType) IDAutomationPOSTNET
Not Applicable MOD10 (DataToEncode) Not Applicable
Not Applicable SpliceText (DataToEncode, SpacingNumber, ApplyTilde) Not Applicable
Methods for Universal & GS1-128 Barcode Fonts
The methods listed below are preceded with IDAutomation_Uni_ and are only to be used with the IDAutomation Universal Barcode Font or the GS1-128 Barcode Font
Barcode Type Methods | Notes
(View Method Descriptions for more information)
Font to Use
(With Purchase Link)
Code 128 C128 (DataToEncode, ApplyTilde)
NOTE: Code128() is the recommended method to use. Code128() is also used to create GS1-128.
C128A (DataToEncode)
C128B (DataToEncode)
C128C (DataToEncode)
IDAutomation_Uni or
IDAutomation_GS1
Not Applicable C128HR (DataToEncode, ApplyTilde)
This method returns text for Code 128 barcodes, such as with GS1-128.
Text Font
Code 39 C39 (DataToEncode, N_Dimension, IncludeCheckDigit) IDAutomation_Uni or
IDAutomation_GS1
Codabar Codabar (DataToEncode, N_Dimension, StartChar, StopChar) IDAutomation_Uni or
IDAutomation_GS1
Interleaved 2 of 5 I2of5 (DataToEncode, N_Dimension, IncludeCheckDigit) IDAutomation_Uni or
IDAutomation_GS1
MS Plessey MSI (DataToEncode, N_Dimension, IncludeCheckDigit) IDAutomation_Uni or
IDAutomation_GS1
USPS IntelligentMail IMb FontEncode (DataToEncode)
IDAutomation_Uni
USPS Postnet Postnet (DataToEncode, IncludeCheckDigit) IDAutomation_Uni
USPS Planet Planet (DataToEncode, IncludeCheckDigit) IDAutomation_Uni
Methods for the DataBar Barcode Font
The methods listed below are preceded with IDAutomation_DataBar_ and are only to be used with the IDAutomation GS1 DataBar Font
Barcode Type Methods | Notes Font to use
(With Purchase Link)
DataBar DataBar (DataToEncode) IDAutomation DataBar 34
DataBar Expanded DataBarExpanded (DataToEncode, 22) IDAutomation DataBar 34
DataBar Exp. Stacked DataBarExpanded (DataToEncode, Segments) IDAutomation DataBar 34
DataBar Limited DataBarLimited (DataToEncode) IDAutomation DataBar 13
DataBar Stacked DataBarStacked (DataToEncode) IDAutomation DataBar 13
DataBar Stacked Omnidirectional DataBarStackedOmniDirectional (DataToEncode) IDAutomation DataBar 34
DataBar Truncated DataBar (DataToEncode) IDAutomation DataBar 13
2D Font Methods
Regarding all symbologies listed in this section below:
  • Separate assembly files will be provided within each package of the appropriately purchased 2D font suite.
Barcode Type Methods | Notes Required Font
Data Matrix Refer to the Data Matrix .NET Standard
IDAutomation2D or IDAutomationDMatrix
QR-Code Refer to the QR Code .NET Standard
IDAutomation2D
PDF417 Refer to the PDF417 .NET Standard IDAutomation2D or IDAutomationPDF417
DotCodeRefer to links within the productIDAutomation2D version 2021 or later
Function Part Descriptions
  • ApplyTilde: If set to 1 or True, characters following the tilde may be used to perform additional functions.
  • DataToEncode: A string value that represents the data being encoded.
  • N_Dimension: Determines the width of the wide bars when applicable, which is a multiple of the X dimension. Valid values are 2, 2.5, and 3. The default is 2. The X dimension is determined by the font point size.
  • IncludeCheckDigit: A Boolean value that determines whether a check digit should be automatically calculated and included for the DataToEncode.
  • Segments: Reducing segments to a low even number such as 4, 6 or 8 in a DataBar Expanded symbol can create a stacked barcode. The default is 22.

Demo Version

The demo font encoder will have an intermittent pop up message. After the purchase of the Developer License of any IDAutomation Barcode Font Package, the demo version DLL will need to be replaced with the licensed version DLL. 

Download Demo

The licensed version also includes C# and VB.NET source code that may be compiled into your project without the assembly.

Creating .NET Barcodes with Other Products

In addition to this product, IDAutomation offers a few other options that create barcode images in .NET without the use of fonts:

.NET Barcode Font Encoder Assembly & DLL Support

Free product support is available by reviewing the font problems and solutions information that IDAutomation has documented and by searching resolved public forum threads. Common Issues and Information:

Customer support is available by contacting IDAutomation, and additional technical support may be attained with the purchase of the one year Level 2 Support and Upgrade Subscription.