
07-20-2009, 05:40 AM
|
|
Newcomer
|
|
Join Date: Jul 2009
Posts: 2
|
|
Barcodes
|
I'm writing a program that prints out barcodes via a thermal receipt printer. The barcodes have to be in Telepen Numeric code which is where i'm having problems. There are many telepen numeric fonts out there, and numerous progrmas that do the encoding for you, but no code!
What I have so far is that I need to have a start character, the message, a check digit, and an end character
The check digit is easy to work out cdigit = message Mod 127
Apparently the start digit is the ascii character for _ and the end digit is the ascii character for Z.
The problem comes with encoding the message as it does not seem as easy as passing the numeric number to the font with the above before and after it as this does not give the correct print out
What seems to be needed is to pass ASCII codes to it in blocks of 2 (i.e. to encode 12 you have to pass the correct character e.g. chr$(12) will give you the number 12.
So I tried the following
Form7.Label1.Caption = Format("_")+chr$(12)+Format(12 Mod 127)+("Z")
and printed it,
BUT it does not seem to give me the correct printout
Does anybody have any experience of working with barcodes and there encoding?
Any help appreciated
James
|
|