bar code generator

Dec 12, 2016 at 1:41pm
hello

I have this project for school. I need to write some code that will generate barcode according to European Article Number 13.

the solution is supposed to look like this :

1)Read a code of maximum 9 digits and a product name (string). If it reads a code shorter than 9 characters, the code will be completed till the 9 characters through adding in front of the read sequence number '7'.

2)check digit calculator for a complete code 12 digit code. The complete code will be obtained by adding in front of the 9 numbers, from above, 3 more numbers, respectively 594

3)for the completed code on the right side with the check digit, a function will be written that will generate equivalent binary encoding (95 binary numbers, 0 or 1).
The encoding consists of:

a. the start code(101, having long bars) +
b. 42 binary numbers (6*7) +
c. the middle separator (01010, having long bars),
d. 42 binary numbers (6*7) and
e. the end code (101, having long bars)

4. After the 95 binary numbers string has been generated, write on the disc a file barcode.html, that has in it the image generated by the 95 binary numbers, in SVG code.

If any of you could come with some help, on making me understand what all this means would be great. Tnx






Topic archived. No new replies allowed.