mcarnerdfimail
|
They did not get back to me about the datasource, but from looking at the program, it would appear that it is using a database.
• Which IDAutomation font encoder you are using:
The licensed IDAutomation Font that we use is called IDAutomationC128.
• Please post the full font encoder function call (including properties):
[Support Note: this section has been reformatted for clarity]
- Sample Input: pcDataToEncode(4209020293269899240000000000000113)
- Resulting string used with IDAutomationC128L: ÍJ)""}:ÆÇ8ÂÂÂÂÂÂ!-UÎ
- Scanned Result: 4209020293269899240000000000000113
- Visual FoxPro logic used:
Lparameters pcDataToEncode, pnReturnType
&&
&& Copyright é IDautomation.com, Inc. 2001. All rights reserved.
&& For more info visithttp://www.IDautomation.com
&&
&& You may use our source code in your applications only if you are
&& using barcode fonts created by IDautomation.com, Inc.
&& and you do not remove the copyright notices in the source code.
&&
&& The purpose of this code is to calculate the Code 128 barcode from character set C
&&
&& You MUST use the fully functional Code 128 (dated 12/2000 or later)
&& font for this code to create and print a proper barcode
&&
* constant definitions for functions
#Define NUMCHARS "0123456789"
#Define ALPHACHARS "ABCDEFGHIJKLMNOPQRSTUVWXWZ"
&& following is encoding table for UPC* function, A and B sections
#Define UPCaNUMTOCODE_A Chr(34)+Chr(35)+Chr(36)+Chr(37)+Chr(38)+Chr(44)+Chr(46)+Chr(47)+Chr(58)+Chr(59)
#Define UPCaNUMTOCODE_B Chr(122)+Chr(61)+Chr(63)+Chr(64)+Chr(91)+Chr(92)+Chr(93)+Chr(95)+Chr(123)+Chr(125)
&& following is an encoding table for Code39Mod43:
&& code = order number of characters and vice versa
&& This is also used to verify the correct content of the string and
&& remove all extra characters
#Define CHARSCode39Mod43 "0123456789ABCDEFGHIJKLMNOPQRSTUVWXWZ-. $/+%"
&& Codabar characters
#Define CHARSCodabar "0123456789$+-/.:"
&& followingare code converting arrays for RM4SCC function to make correlation
&& between a character in the input string and R+C code.
#Define CHARS_RM4SCC "0123456789ABCDEFGHIJKLMNOPQRSTUVWXWZ"
#Define CODES_RM4SCC_RplusC Chr(11)+Chr(12)+Chr(13)+Chr(14)+Chr(15)+Chr(10)
+Chr(21)+Chr(22)+Chr(23)+Chr(24)+Chr(25)+Chr(20)+Chr(31)+Chr(32)
+Chr(33)+Chr(34)+Chr(35)+Chr(30)+Chr(41)+Chr(42)+Chr(43)+Chr(44)+Chr(45)+Chr(40)
+Chr(51)+Chr(52)+Chr(53)+Chr(54)+Chr(55)+Chr(50)+Chr(01)+Chr(02)+Chr(03)+Chr(04)+Chr(05)+Chr(00)
m.lcDataToPrint = ""
m.pcDataToEncode = Alltrim(m.pcDataToEncode)
&& Check to make sure data is numeric
&& Check to make sure data is numeric and remove dashes, etc.
m.pcDataToEncode = Chrtran(m.pcDataToEncode, ;
chrtran(m.pcDataToEncode, NUMCHARS, ""), "")
&& Check for an even number of digits, add 0 if not even
If Len(m.pcDataToEncode) % 2 = 1
m.pcDataToEncode = "0" + m.pcDataToEncode
Endif
&& Assign start + stop codes
m.lcStartCode = Chr(205)
m.lcStopCode = Chr(206)
&& <<<< Calculate Modulo 103 Check Digit and generate m.lcDataToPrint >>>>
&& Set m.lnweightedTotal to the Code 128 value of the start character
m.lnweightedTotal = 105
m.lnWeightValue = 1
m.lnStringLength = Len(m.pcDataToEncode)
For m.I = 1 To m.lnStringLength Step 2
&& Get the value of each number pair
m.lnCurrentValue = Val(Substr(m.pcDataToEncode, m.I, 2))
&& get the m.lcDataToPrint
m.lcDataToPrint = m.lcDataToPrint + Chr(Iif(m.lnCurrentValue = 0, 194, ;
iif(m.lnCurrentValue < 95, m.lnCurrentValue + 32, ;
m.lnCurrentValue + 100)))
&& multiply by the weighting character
m.lnCurrentValue = m.lnCurrentValue * m.lnWeightValue
&& add the values together to get the weighted total
m.lnweightedTotal = m.lnweightedTotal + m.lnCurrentValue
m.lnWeightValue = m.lnWeightValue + 1
Next m.I
&& Divide the m.lnweightedTotal by 103 and get the remainder, this is the m.lnCheckDigitValue
m.lnCheckDigitValue = m.lnweightedTotal % 103
&& Now that we have the m.lnCheckDigitValue, find the corresponding ASCII character from the table
m.lcC128_CheckDigit = Chr(Iif(m.lnCheckDigitValue = 0, 194, ;
iif(m.lnCheckDigitValue < 95, m.lnCheckDigitValue + 32, m.lnCheckDigitValue + 100)))
&& m.pnReturnType 0 returns data formatted to the barcode font
If m.pnReturnType = 0
Return m.lcStartCode + m.lcDataToPrint + m.lcC128_CheckDigit + m.lcStopCode + " "
Endif
&& m.pnReturnType 1 returns data formatted for human-readable text
If m.pnReturnType = 1
Return m.pcDataToEncode + Alltrim(S
Posted 7.9 year(s) ago
|