Interleaved 2 of 5 not right ?

Hi,

When i'm trying display the following barcode in interleaved 2 of 5 : 01677718010005 it displays 167771801000 as i scan it... somehow it loses the leading zero !

Any fix for it ?

Comments

  • edited 8:03AM
    I think i found the problem and solved id.

    frxbarcod.pas
    function TfrxBarcode.Code_2_5_interleaved:AnsiString;
    var
      i, j : integer;
      c : AnsiChar;
    begin
      result := '5050';   {Startcode}
        
      [b]//begin  change
      if Odd(Length(FText))  then
        FText := '0' + FText;
      //end  change[/b]
    
      if FCheckSum and (Length(FText) mod 2 <> 0) then
          FText := DoCheckSumming(FText);
    
      for i:=1 to Length(FText) div 2 do
      begin
        for j:= 1 to 5 do
        begin
          if tabelle_2_5[FText[i*2-1], j] = '1' then
            c := '6'
          else
            c := '5';
          result := result + c;
          if tabelle_2_5[FText[i*2], j] = '1' then
            c := '1'
          else
            c := '0';
          result := result + c;
        end;
      end;
    
      result := result + '605';    {Stopcode}
    end;
    

    Please change it in the next release
  • gpigpi
    edited 8:03AM
  • edited 8:03AM
    gpi wrote: »


    I know..
    but when i enter an odd value to present the barcode it should add an leading zero, which is not implemented yet !
  • edited 8:03AM
    Andreetje wrote: »
    Hi,

    When i'm trying display the following barcode in interleaved 2 of 5 : 01677718010005 it displays 167771801000 as i scan it... somehow it loses the leading zero !

    Any fix for it ?

    hello, can this barcode in interleaved 2 of 5 help you ? hope it is useful.

Leave a Comment