We want to bring our order-number as a barcode on paper. The number is an Integer in the field. For this we use a Code 39 font, and the barcode looks all right on paper, but can not be read by the scanner. Only if we change the field to Alpha and put in * as start and stop character it works. Any idea how to aviod the asterisk, and anyone who knows a font where it works 'out of the box' ? Can the setup for scanner be changed ?
Barcode scanning relies on two factors, 1) clear contrast between the white and black and 2) clear definition of bar widths. As long as the font prints sharp images that produce clearly defined lines you should have little trouble with it. Your problem with *s has me stumped. I'll ask a few of my developers to see if they have an idea.
We've previously worked heavily with barcode systems and we used several freely available TTF font files with no problem whatsoever. We've had good results with their "code 39" symbology. I'll see if I can't dig up the name of one of the free ones for you.
Thanks for your comments. Have read the idautomation site, and testet the C39M font Version 3.07, without any luck. They have ActiveX Barcode controls for some different software, but not for Paradox. I tryed to install one of the .ocx files, but it worked badly and only in forms, and not reports. At the end it went into General Protection Error. We could change the values by using strings and put in the asterisks, but when we want to scan it again, it would corse problems.
Mike - I would be very interested to hear which font you have used.
The reason for the asterisks has to do with the barcode type in use. They each have their own requirements including start/stop characters (asterisk) and alpha, or alpha-numeric, and/or symbols, etc.
The most common barcodes are UPC codes (the ones you see on products in stores) and I believe those are regulated; you have to get the barcode ID assigned to your product from a clearinghouse. The next most popular, the one I worked with the most, is Code 39 (also known as Code 3 of 9) ... here's a site with it's specs:
It has an asterisk start character, followed by the value to be represented by the barcode (can consist of 0-9, A-Z, space and several symbol characters) followed by a MOD43 check digit (explained in the URL above, and then a final asterisk stop character.
There are several hundred different types of barcodes, but UPC, Code 3 of 9 and Code 128 I believe are the most common ones.
It's been a long time since I worked with them, so I don't remember all the details. But hopefully that link will help you especially since you are working with Code 39 (Code 3 of 9). Let me know if you still have issues/questions and I'll see what I can dig up in my old files.
Well, to produce a properly formed bar code, you have to follow the required specs (asterisks, etc). Most scanners/readers will detect the bar code type and only return the value (the number you actually wanted coded). So yes, you need to convert the output to string to produce the barcode.
If your bar code scanner/reader is passing the raw code data to you (including the asterisks, etc) then you will have to parse that out and get to just the value you want, but I'd be surprised if the scanner returned more than just the value of the barcode.
You should also make sure the barcode font you are using is in fact free (or you paid for it). If it's a demo font it may not produce all the characters as you expect. Here's one that is supposed to be free and work well (though I don't have a scanner handy so I've not personally tried it):