2

It is easy to convert EAN-8 bar code to EAN-13 by adding zeros on left side of EAN-8 bar code... But I have a bar-code of EAN-13 type and i need to convert it to EAN-8?

Sree Theja
  • 21
  • 1
  • Welcome to StackOverflow & Hope this helps! 1. Just trim that first 5 digits. Lossy Method 2. If you want to maintain a hash dictionary, then you can generate a new EAN-8 for EAN-13. This way without any loss of information, you can have 1 to 1 matching. – sam Oct 25 '19 at 06:26
  • @Sampath can you provide some clear explanation. In case 1 what do we do for barcodes like 0855925266648? – Ramakrishna Nov 13 '19 at 09:55
  • In case of `0855925266648 `, remove the first 5 digits (`08559`) and you would get `25266648`. This generally comes under a lossy compression logic. – sam Nov 19 '19 at 09:45

0 Answers0