Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
i want to generate barcodes with images to be printed and put on items that don't have barcode. how do i generate these images and codes.
Posted
Comments
ZurdoDev 4-May-15 10:36am    
Find a 3rd party control that does it.
K_TENG 4-May-15 10:54am    
Do you recommend any..?
ZurdoDev 4-May-15 10:55am    
No. I used a real simple one years ago but can't remember which one it was. In fact it was a 2D barcode image but still easy to use.

They should all be pretty simple. You just give it a value and it generates the image for you. I'd just google for some.
K_TENG 4-May-15 11:01am    
ok...thanks.
Afzaal Ahmad Zeeshan 4-May-15 10:49am    
Bar codes are not just plain images. Are you sure you can simply create a jpg with some black and white strips and put it over a product and it will play the role of barcode?

1 solution

Some barcode types (e.g. Code 39, Code 128, Interleaved 2 of 5) can be "generated" simply by using a font that displays the appropriate bars instead of digits or letters. So you wouldn't need any special component, just some code that is able to print text and then select the barcode font instead of the usual readable font. Depending on the type of barcode you would only have to do some minimal "preprocessing" of the output string, e.g. for Code 39 it's required that you prepend and append an asterisk (e.g. *1234* to get 1234). For Interleaved 2 of 5 it's a bit more sophisticated but also not really difficult: http://en.wikipedia.org/wiki/Interleaved_2_of_5[^]
There are some free to use barcode fonts on the web, here's a Google search for that:
https://www.google.com/search?q=free+barcode+font&ie=utf-8&oe=utf-8[^]

And then there are a lot of Codeproject-articles that present ways for barcode generation. I didn't take a look at them because for me the above method works like a treat, but maybe you'll find one that's more convenient for you. Here's a Google search for those articles:
https://www.google.com/search?q=codeproject+generate+barcode+&ie=utf-8&oe=utf-8[^]
 
Share this answer
 
v2
Comments
CPallini 4-May-15 11:00am    
5.
Sascha Lefèvre 4-May-15 11:11am    
Thank you! :)
Sergey Alexandrovich Kryukov 4-May-15 11:17am    
A 5.
—SA
Sascha Lefèvre 4-May-15 11:29am    
Thank you, Sergey! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900