Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing UPC Code 128 Barcodes
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Printing UPC Code 128 Barcodes
Miscellaneous
Thread ID:
01320633
Message ID:
01320633
Views:
62
I am having some trouble getting some very simple Code 128 barcodes to print correctly. It looks like an extraneous character is being added to the front of the barcode image. You can see an example of what I am talking about at:

http://www.edssolutions.net/barcode.htm

Because this extraneous character occurs at the front of the barcode, it leads me to suspect the checksum program I am using (which I copied and pasted from a thread in this forum :-) ).

Here is the code:
Parameters l_in

z=104

For q=1 To Len(l_in)
	Y=Asc(Subs(l_in,q,1))-32
	z=z+Y*q
Endfor

z=Mod(z,103)

Do Case
	Case z=0
		Return Chr(162)+l_in+Chr(174)+Chr(164)
	Case z<94
		Return Chr(162)+l_in+Chr(z+32)+Chr(164)
	Otherwise
		Return Chr(162)+l_in+Chr(z+71)+Chr(164)
Endcase
Is the CHR(162) character that is being appended to the front of the string correct? Could it possibly be my font that is the culprit? I have tried several different Code 128 fonts, but all give the same results.

Anyone have any insight into this behavior?

Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform