Friday, December 21, 2007

Using Barcode Fonts To Create And Print Barcodes

What are barcode fonts? Basically they are just that - plain fonts. But rather than depicting numbers and letters they contain the bars and spaces that make up a barcode symbology. They are installed to your fonts folder or directory and will show up in your application's font list just like "Courier" or "Arial".

"That sounds good! So basically I just enter a couple of digits in Word, add the start / stop characters, change the font to Code UPC and have a nice barcode.", you say.

Not quite. You see, this approach will only work for simple barcodes like Code 39 where every group of bars and spaces (also called a symbol) is directly mapped to the character encoded.

Some Conversion Required

However, more complex symbologies like UPC or EAN require one more step to perform before the code can actually be displayed. The number to be encoded has to be "converted" to be usable with a given font. This is usually done with a little software tool that comes with the fonts. Also a checksum or check digit has to be calculated.

The use of such a conversion tool is acceptable if you have to print only a handful of codes. But what if you have to print scores of UPC codes? Hopefully you are not supposed to manually convert all those numbers! Fortunately, most conversion tools provide a batch conversion of numbers. Many vendors will also supply macros, DLL's and sample code snippets to be used, say, in Visual Basic, that handle the conversion.

Now that we've learned the basics of barcode fonts, what are their pros and cons?

Advantages of Barcode Fonts

1. Barcode fonts will work in almost any application that works with text: Word processors, spreadsheets, databases, image editing, DTP software, most programming environments etc.

2. Depending on the barcode type involved it's sufficient to simply enter the number and change the font.

3. Barcode fonts will scale and print very well because, unlike images or bitmaps, they are not pixel based.

4. Barcode fonts are available for almost any platform: Linux, Mac, Windows.

5. Barcode fonts are usually the cheapest barcode software available. If you only need Code UPC, you only have to buy a Code UPC font (many vendors will actually provide a collection of fonts for the reasons detailed below). This will usually cost no more that USD 30 to USD 50.

Drawbacks of Barcode Fonts

1. Some symbologies require a conversion before formatting.

2. Scaling a font will scale it in all directions. E.g. it's usually not possible to make the barcode higher while keeping the width unchanged. Generally speaking, fonts are not very flexible. Most vendors therefore supply fonts with different ratios and sizes.

3. The same goes for the human readable text of the barcode. What if you need the Code UPC above without text? You could either cover the text with another object or hope that the vendor supplies a font with the bars only.

4. Barcode fonts are basically an "Add-On" to another software. This means you are stuck with the capabilities of the software in question when it comes, for example, to label printing.

Pro Barcode is your source for Barcode Software. Barcode newbies visit our section Barcode Know How and FAQ.

Labels: , , ,