Home > database >  Generate the barcode code code128c in pb11.5 is unavailable
Generate the barcode code code128c in pb11.5 is unavailable

Time:09-22

A code128c function, can be normal use, under pb9.5 under pb11.5 properly generated barcode, will already mid () to mida (), len () to Lena (), looks like the number was in the middle of the bar code can be generated, the start and end operator or gibberish, char (where) may be modified, can you tell me how to modify?
Please directly point out how to modify, don't say pb11.5 net is unicode, a Chinese character when a byte no practical help, such as
The code is as follows:
String ls_input_number
String ls_StartC, ls_End
String ls_rtn_char='
String ls_Code
String ls_00 ls_95, ls_96 ls_97, ls_98, ls_99, ls_CodeB, ls_CodeA, ls_FNC1
Integer I, k, li_len li_mid_char, li_xc, li_sum=0
Ls_input_number=trim (as_input)
If isnull (ls_input_number) then ls_input_number='
Li_len=lenA (ls_input_number)
If ls_input_number='or mod (li_len, 2) & lt;> 0 then return '
If not isnumber (ls_input_number) then return '

Ls_StartC=char (167) + char (175)
Ls_End=char (167) + char (176)
Ls_00=char (167) + char (163)
Ls_95=char (167) + char (164)
Ls_96=char (167) + char (165)
Ls_97=char (167) + char (166)
Ls_98=char (167) + char (168)
Ls_99=char (167) + char (169)
Ls_CodeB=char (167) + char (170)
Ls_CodeA=char (167) + char (171)
Ls_FNC1=char (167) + char (172)


K=0
For I=1 to li_len step 2
K +=1
Li_mid_char=integer (MidA (ls_input_number, I, 2))

If li_mid_char=0 then
Ls_rtn_char +=ls_00
Elseif li_mid_char=95 then
Ls_rtn_char +=ls_95
Elseif li_mid_char=96 then
Ls_rtn_char +=ls_96
Elseif li_mid_char=97 then
Ls_rtn_char +=ls_97
Elseif li_mid_char=98 then
Ls_rtn_char +=ls_98
Elseif li_mid_char=99 then
Ls_rtn_char +=ls_99
The else
Ls_rtn_char +=string (char (li_mid_char + 32))
End the if
Li_sum +=li_mid_char * k
Next
Li_xc=mod (103) 105 + li_sum,
If li_xc=0 then
Ls_code=ls_00
Elseif li_xc=95 then
Ls_code=ls_95
Elseif li_xc=96 then
Ls_code=ls_96
Elseif li_xc=97 then
Ls_code=ls_97
Elseif li_xc=98 then
Ls_code=ls_98
Elseif li_xc=99 then
Ls_code=ls_99
Elseif li_xc=100 then
Ls_code=ls_CodeB
Elseif li_xc=101 then
Ls_code=ls_CodeA
Elseif li_xc=102 then
Ls_code=ls_FNC1
The else
Ls_code=string (char (li_xc + 32))
End the if

Return ls_StartC + ls_rtn_char + ls_code + ls_End

CodePudding user response:

The char with charA

CodePudding user response:

CharA tried, also not line, the starting character and terminators are garbled, when the number is 0, also will be out of the code

CodePudding user response:

If only print the barcode, advice or a special bar code software, as high recognition efficiency

CodePudding user response:

In the corresponding barcode font installed in the computer, and then to display in the PB substituted into the field of bar code font

CodePudding user response:

Which have change the barcode font will do such a good thing, and began to operator and conversion code, check code, end code very troublesome
  • Related