Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BARCODE PRINTINT CODE128 FONT.
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00451917
Message ID:
00456077
Views:
20
>We have a VFP 6.0 app that prints manifests for shipping. Part of it prints a label for UPS shipping. We would like to add a
>barcode to be scanned by UPS. We downloaded the CODE128 font set and added the bar code to our report
>using a tracking number from our database. However, the scanner will not read the barcode. Any suggestions?
>I appreciate your time.
>Thanks,

We recently added a C128b font to one of our label reports, and here are some observations:

Check your Font, is it Azalea? Wasp? Wasp, for instance, maps the font in a non-standard fashion so you must use their DLL to get valid checksums. We did hack the standard character set, but felt it was not worth taking a chance that we would miss a non-standard character's map. We chose Azalea, which works fine.

Are you sure you are generating the correct start, checksum and end character? You will find a good start at the Azalea website where they have some Foxpro sample code. Errors in their example: when you find "X = VAL(C) - 32" you will find this should be "X = ASC(C) - 32", also the final string constructed by "OUTSTRING = CHR(162) + TheString + CHKCHR + CHR(164)" should be "OUTSTRING = CHR(182) + TheString + CHKCHR + CHR(184)".

I was able to make this font work by printing samples of VERY simple data -- 1 character! The checksum math is fairly simple for one character so it gives you a good starting place. For instance, the checksum for "A" is "B" and the checksum for "1" is "2". So, print a sample with CHR(182) + "A" + "B" + CHR(184) being the value sent to the font. It should print a valid barcode. Remember, this is subset B. I am sorry but I do not have my reference with me on the 128 standard so I cannot comment on changes needed to this for the 128A and 128C variants. As I recall, C is numeric only, A and B are alphanumeric. UPS codes are alpha, so it should be A or B.

A quick note about verifying this sample with a barcode scanner - If the scanner is enabled to read 128, most all are by default, it can confirm this sample by "beeping" on a good scan. If you know the scanner is 128 enabled and the scan is still not good, check the font size. This affects the density at which the bars are printed and it is very easy to exceed the resolution of the printer you are using. The sample codes should print about 3/4-inch high and 3/4-inch long. I had the advantage of a real barcode printer to generate valid samples for comparison. The Azalea font is printing on printers from HP 4050 Laserjets to Okidata 9-pin impact printers with excellent results.

Sorry about the War & Peace size of this note, but I don't see why someone else should suffer through this problem as I have. I am only an occasional UT user, so please feel free to e-mail me if I can be of additional assistance.

James
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform