Delphi Powerful Enterprise-Grade Barcode Scanning Library Available For Delphi

FireWind

Свой
Регистрация
2 Дек 2005
Сообщения
1,957
Реакции
1,203
Credits
4,034
Powerful Enterprise-Grade Barcode Scanning Library Available For Delphi
February 5, 2021 by Muminjon

One of the best and popular barcode scanning library for Delphi is ZXing.Delphi library. ZXing Barcode Scanning Object Pascal library for Delphi VCL and Delphi Firemonkey.

ZXing.Delphi is a native Object Pascal library that is based on the well known open source Barcode Library: ZXing (Zebra Crossing). This port is based on the .Net Redth port of ZXing and the Java one. It is aimed at all of the FireMonkey mobile platforms and, starting from v3.1, it fully supports also Windows VCL applications (no dependencies on FMX.Graphics unit).

With this library, you can scan with native speed without the use of linking in external libraries and avoid compatibility issues and dependencies. It is fast.
Код:
procedure TmainFrm.btnLoadFromFileClick(Sender: TObject);
var  ReadResult: TReadResult;
     ScanManager: TScanManager;
     bmp:VCL.Graphics.TBitmap; // just to be sure we are really using VCL bitmaps
begin
  if not OpenDlg.Execute then exit;
  image.Picture.LoadFromFile(openDlg.FileName);
  ReadResult := nil;
  ScanManager := nil;
  bmp := nil;
  try
    bmp:= TBitmap.Create;
 
    bmp.assign (image.Picture.Graphic);
    ScanManager := TScanManager.Create(TBarcodeFormat.Auto, nil);
    ReadResult := ScanManager.Scan(bmp);
    if ReadResult<>nil then
      log.Lines.Text := ReadResult.text
    else
      log.Lines.Text := 'Unreadable!';
  finally
      bmp.Free;
    ScanManager.Free;
    ReadResult.Free;
  end;
end;

Features​

  • Natively compiled barcode scanning for all VCL and FireMonkey platforms (IOS/Android/Windows/OSX).
  • 100% free. No license fees. Just free.
  • Speed
  • Simple API
  • Unit tests provided
  • Test projects provided
Head over and check out the ZXing.Delphi Barcode Scanning library!