EAN–8
EAN-8 (European Article Number), also known as GTIN-8, is a short 8-digit barcode. The numbers are divided into 2 blocks of 4 numbers. The first 2 digits identify the country of origin of the goods, then 5 digits are the encoded information, and the last digits are the checksum to verify the integrity of the data.
This code was created based on EAN-13 by reducing the size of the code to 8 digits. This adjustment allows for the placement of the code on small packages. As long as there is a country identifier in the code, it is considered international.
EAN-8 is used in trade to identify products and equipment.
Each digit is encoded using 7 units, which consist of vertical lines and spaces. Let's assign 0 to represent a space and 1 to represent a line. The encoding of the numbers can be represented as follows:
- 0 – 0001101;
- 1 – 0011001;
- 2 – 0010011;
- 3 – 0111101;
- 4 – 0100011;
- 5 – 0110001;
- 6 – 0101111;
- 7 – 0111011;
- 8 – 0110111;
- 9 – 0001011.
Let's see in this example:
Remember, the code begins with 101, followed by the encoding for each digit starting from 3 and so forth. As mentioned earlier, the code is divided into two parts. The separator line, along with the starting and ending lines of the code, is long and represented by the 01010 pattern.
Upon closer examination, you'll observe that the lines following the separator do not match the numbers listed above. This is because a different encoding scheme is utilized for the second part:
- 0 – 1110010;
- 1 – 1100110;
- 2 – 1101100;
- 3 – 1000010;
- 4 – 1011100;
- 5 – 1001110;
- 6 – 1010000;
- 7 – 1000100;
- 8 – 1001000;
- 9 – 1110100.
To generate an EAN-8 barcode in FastReport .NET, select the Barcode object at the Components Panel in the Report Designer. In the drop-down list, navigate to the "EAN/UPC" category, and then choose EAN8:
After selecting the barcode, place it on the Report Page.
Double-click on the added barcode to open the editor. You can also open the barcode editor by clicking the button in the context menu of the added object, accessed by right-clicking:
If you want to hide the text under the barcode, locate the ShowText
property in the property inspector of the corresponding barcode and set its value to False
: