Beginning Barcodes

About a year ago, I made a bit of an impulse buy on eBay and purchased a barcode scanner for a little less than a dollar (little did I know that shipping and handling would cost me 9 dollars more, but 10 bucks isn’t really anything to worry about).

BarcodeScanner

Why you ask?

Because for some reason I thought it might be a good idea to have a barcode scanner available so I could learn a bit about programming applications using barcodes.

What have I learned so far?

Well there’s a lot of talk on how you need permission to use certain barcodes. Especially EAN and UPC seem to be regulated if you want to distribute your product, but EAN is only the tip of the iceberg.

Some of the simplest barcodes to work with today can be installed as fonts and these include Code 39, Code 93 and Code 128.

But you can’t just download a font and think it’ll work like that – barcodes usually need some way of knowing where to start and stop reading, so the name “Studio Black” would have to be written “ÌStudioÂBlack{Δ to work in Code 128.

Luckily, several websites, like this one, can help translate for you.

So how does this work?

Barcodes are actually an incredibly simple and efficient input method and isn’t really all that different from a computer keyboard. Think of it as a mix between a keyboard and a scanner. When it reads any barcode it supports, your computer will pretty much only act as if it received keyboard input in the form of a string or number.

Some barcodes support alphanumeric data (like Code 39 and Code 128), which means it can contain both text and numbers, while others are simply numeric (like EAN and UPC).

Because of this, programming an application that reads barcodes require next to nothing extra and you can probably just use the same old text fields and forms as always. The USB barcode scanner I have is pretty simple to use and drivers were as easy and automatic as when connecting a keyboard or mouse – just plug and play.

In the long run, the biggest hassle is probably getting familiar with the legal issues of it all.

You can find the fonts for the different barcode systems:

Here: Code 39

Here: Code 93 and

Here: Code 128

As of yet I’ve had the best luck using Code 128, with the type of barcode scanner you can find for about 10 bucks off eBay. My model is called X-9100 and works like a charm.

By the way, make sure to never use bold or italic with barcode fonts, they mess up everything.