Build React Native App (4) - Redux, Jest, and NativeBase

* If you like my article, please click AD on this blog. This will help me to motivate to keep up the posting. *
EAN 128 is comprised of following structure
If you look at the barcode per character, you will notice that 3 lines will be represent one letter or symbol except the stop code which is 4 lines.
To understand EAN-128 Code C, if you look at the USC Code-128 Character Set from the reference site, you will notice that all digits, alphabets, and symbols must be represented with two numbers.
Let’s look at the example of showing itemcode with Code C type. The itemcode must be numeric and we will be 14 digits for the itemcode(This length can be different depending on the specification) including check sum.
The length of itemcode will be 14 including check digit, so the itemcode should have 13 digists and 1 digit for the checksum. The itemcode for the example will be 0000010001000 which is 13 digits and checkdigit will be 8 for this itemcode. The final code will be 0000100010008 for the itemcode.
As I explained the format of EAN 128 Code C type, the format will be
The method to calculate the MOD is in the reference site. In our case,
CODE C | start c | fnc1 | 34 | 31 | 31 | 33 | 31 | 33 | 31 | 41 |
---|---|---|---|---|---|---|---|---|---|---|
Weight | 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Value | 105 | 102 | 2 | 0 | 0 | 1 | 0 | 1 | 0 | 8 |
Weight*Value | 105 | 102 | 4 | 0 | 0 | 5 | 0 | 7 | 0 | 72 |
Total | 295 | |||||||||
MOD103 | 89 |
MOD103 means remainder of 295 divided by 103.
As you saw this explanation, barcode line is consisted of 3 lines except STOP code which is 4 lines. To generate this right data using this method from SQL Report or other tool, you will need to write a code which reads string and translate it to EAN 128 format code. I hope this helps to understand how EAN 128 can be generated manually using any text editor with free font.
Comments
Post a Comment