Creating ITF-14 barcodes in .NET applications

2021-02-25

Creating ITF-14 barcodes in .NET applications

ITF-14 (Interleaved Two of Five) is a two-band numeric code, otherwise known as a high-density code, which can only encode numbers in an even number. Each barcode encodes an odd number with a dark line and an even number with a space in between. To encode an odd number of digits, you must suffix the left-most (highest) digit with a zero. The specifics of coding will be explained later.

The implementation of barcode ITF-14 or interleaved 2 of 5 is used to encode the Global Trade Item Number. The Global Trade Item Number (GTIN) is a trade item identifier developed by GS1. It is an international organization dedicated to the standardization of record-keeping and bar-coding of logistical units.

GS1 identifiers are used to search for product information in a database either manually or by entering the number through a barcode scanner pointed at the barcode.

Let's take a brief look at barcode standards. Two main barcode standards have been established: EAN/UCC-13 for single item.

European Article Number, EAN (European Article Number), afterwards also known as International Article Number, the European barcode standard designed to encode product and manufacturer identification. ISO/IEC 15420:2009 Information technology — Automatic identification and data capture techniques — EAN/UPC bar code symbology specification.

Product number EAN/UCC-13 has the following structure:

— first 2-3 numbers — country code of registration for EAN Russia 460-469; 400-440 Germany; 590 Poland; 84 Spain; 00-09 USA and Canada; 560 Portugal; 840-849 Spain; 789-790-Brazil.

— next 4-5 numbers – is the business registration number within the national organisation;

— the next group of numbers refers to the sequential number of the product within the company;

— the last 13th digit is the checksum or check digit. It is calculated from the previous twelve.

It is important to remember that the EAN barcode is used to uniquely identify products. The ITF-14 barcode is used to automate the inventory of goods placed in individual or group transport packaging. The computer accounting system determines not only the type of goods in the package, but also their quantity. In simple terms, the ITF-14 code group is a subset of the EAN-13 code and differs from it by an additional first digit.

ITF-14 are commonly used for printing on corrugated cardboard, for labelling cardboard boxes, crates or pallets. They are widely used by retailers, manufacturers and distributors for precise logistics and stock handling. They can also be found in luggage identification at airports, airline ticket numbering, postal item identification.

Here is one example of an ITF-14 box-based application from MilkyWay.

FastReport.NET

The ITF barcode can be printed not only on labels, but also directly on the walls of cartons, corrugated boxes or any other surface of rough texture. Even then it will be successfully read by scanners.

Here is another example from life based on the XEROX 008R13041 staple cartridge.

FastReport.NET

Because the ITF-14 barcode is designed to identify goods in shipping containers - it does not provide for processing at POS terminals.

Coding features

The ITF-14 always encodes 14 digits, but we only enter 13 digits. Why? I'll give you an example of the scheme:

FastReport.NET

The indicator is an indication of the packaging level for a particular carton. This unambiguous prefix can range from 0 to 8. (e.g. 1 for box, 2 for crate, etc.).

The GS1 company prefix can be 7 to 10 digits long and is assigned to uniquely identify the owner of a particular brand. Suppliers must obtain this prefix directly from GS1 to uniquely identify their company.

Item reference - refers to the same product number used for the GTIN item level when the carton consists of the same item. Cartons with a product range are assigned a new product number.

The check digit is the last digit of a given barcode, which is the calculated check sum, but it is not determined by all previous digits, but only by the 12 following the first digit. Using the MOD10 algorithm, the calculated checksum prevents substitution errors.

The thick black border around the barcode is called the Bearer Bar. This bar balances the pressure created by the print plate across the bar code surface and improves readability by reducing the likelihood of an incomplete character being scanned. ITF-14 is available with visible or concealed vertical support bars.

Size - The two components that define the width of an ITF-14 barcode symbol are the ratio of the width to the narrow part. This ratio remains constant and should always be between 2.25:1 and 3:1.

Let's move on to practice - how to do-quick ITF-14 in your .NET project in MS Visual Studio? FastReport .NET to the rescue! There is such an object among barcodes!

Setting up the ITF-14 in the designer 

FastReport.NET

Add to the Barcode sheet and select exactly ITF-14. Barcodes 2/5 Interleaved, 2/5 Industrial, 2/5 Matrix are also Interleaved Two of Five, but these are completely different objects. You can read more about them here.


I'll show you the ITF-14 and the 2/5 Interleaved as an example. As you can see, the difference is obvious.

FastReport.NET

Next we see a large number of properties for more fine-tuning, but let's focus on some specific ones:

"Angle" - This property allows you to set the rotation of the object to one of the fixed angles - 0, 90, 180, 270 degrees.

"Zoom" - Defines the scale of the barcode. This property is used only together with "Auto Zoom" property.

“AutoSize” – If this property is enabled, the object will be stretched to show the whole barcode. If disabled, the barcode will be stretched to the size of the object.

"ShowText" – Defines whether the text at the bottom of the barcode should be shown.

"DataColumn" – Data field from which to load object text.

"Expression"– An expression that returns the text of the object.

"Text" – text ogject.

"Padding" – Allows you to set the indentation from the edges of the object, in pixels.

"WideBarRatio" – All linear barcodes have this property. It defines the relative size of the wide bars of a barcode.

"CalcCheckSum" – Many linear barcodes have this feature. It determines whether the checksum should be read automatically. If disabled, the checksum must be present in the text of the object.

"DrawVerticalBearerBars" – If this property is enabled, the object will have side lines displayed. If disabled, the barcode will have the following appearance:

FastReport.NET

Comparison of ITF-14 & interleaved 2 of 5

Speaking of these two barcodes, interleaved 2 of 5 is a dimensionless version of ITF-14, because ITF-14 has a strict number of characters, namely 13 + 1 checksum. Interleaved 2 of 5 can also contain those 13 characters. Let me show you an example:

FastReport.NET

The first is ITF-14 and underneath is Interleaved 2 of 5. The values are coded the same and the bars look the same. The widths are different because of the different standards. It follows that if the same 13 characters are encoded in the interleaved 2 of 5, we get ITF-14, but without any special design for this standard - only the same values.

Creating ITF-14 with code

You can add a barcode object either in the user application code when you create a report from the code. Let's look at an example of creating a report in code, and adding an ITF-14 barcode object to it:

Creating and outputting ITF-14 barcodes in.NET applications
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//Create report object
Report report = new Report();
//Ceate report page
ReportPage page = new ReportPage();
//Create unique name
page.CreateUniqueName();
//Add the page to report collection
report.Pages.Add(page);
//create data band
DataBand dataBand = new DataBand();
//Create band with unique name
dataBand.CreateUniqueName();
//Add it to band collection
page.Bands.Add(dataBand);
 
//Create barcode object
FastReport.Barcode.BarcodeObject barcode = new FastReport.Barcode.BarcodeObject();
//Set the barcode type
barcode.Barcode = new FastReport.Barcode.BarcodeITF14();
//Set the code number
barcode.Text = "597861558";
//Put the barcode on the page
barcode.Parent = dataBand;
//Set the object dimensions 
barcode.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 3);
//Show report
report.Show();

So, ITF-14 encodes only numbers and is only used on boxes with EAN/UCC-13 barcode item inside. So, with support for ITF-14 and other barcodes, FastReport.NET allows you to create complete reports and labels for trade, logistics and inventory management.

September 19, 2024

How to troubleshoot the most common issues when installing FastReport VCL

We have compiled a list of the most popular problems when installing FastReport VCL and have prepared detailed instructions on how to fix the problems that have arisen.
August 12, 2024

How to build and install the Postgres plugin in FastReport .NET

This article describes how to connect to the database using the FastReport .NET plugin for the report designer from Visual Studio via the NuGet server.
August 08, 2024

How to install FastReport .NET and its components on Windows

Step-by-step instructions for online and manual installation via the FastReport registration code.NET and its components in Windows.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314

© 1998-2024 Fast Reports Inc.