ByteScout Barcode Suite - Delphi - Read barcodes from subfolder with barcode reader sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Barcode Suite – Delphi – Read barcodes from subfolder with barcode reader sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – Delphi – Read barcodes from subfolder with barcode reader sdk

How to read barcodes from subfolder with barcode reader sdk in Delphi and ByteScout Barcode Suite

Learn to read barcodes from subfolder with barcode reader sdk in Delphi

The documentation is designed for a specific purpose to help you to apply the features on your side. ByteScout Barcode Suite is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK). It can read barcodes from subfolder with barcode reader sdk in Delphi.

This prolific sample source code in Delphi for ByteScout Barcode Suite contains various functions and other necessary options you should do calling the API to read barcodes from subfolder with barcode reader sdk. Simply copy and paste in your Delphi project or application you and then run your app! Enjoy writing a code with ready-to-use sample codes in Delphi.

All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Project1.dpr
      
//******************************************************************* // ByteScout Barcode Reader SDK // // Copyright ? 2016 ByteScout - https://www.bytescout.com // ALL RIGHTS RESERVED // //******************************************************************* program Project1; {$APPTYPE CONSOLE} { Sample that shows reading of barcodes from images in /Images/ subfolder } uses SysUtils, ComObj, ActiveX; var reader: Variant; SR: TSearchRec; arrayOutput: Variant; varItem: Variant; i: integer; pathWithImages, imageType: string; begin CoInitialize(nil); // Disable floating point exception to conform to .NET floating point operations behavior. System.Set8087CW(
{codeFileName}
      
{code}

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples


33f);

// Create and initialize Bytescout.BarCodeReader.Reader object
reader := CreateOleObject('Bytescout.BarCodeReader.Reader');
reader.RegistrationName := 'demo';
reader.RegistrationKey := 'demo';

// Enable Code 39 decoding, you may also enable other types (dozens of types supported)
// see .BarCodeTypesToFind for more values.
reader.BarcodeTypesToFind.Code39 := true;

// For example to enable Code128 uncomment line below
// reader.BarcodeTypesToFind.Code128 := true;

// For example to enable QR Code uncomment line below
// reader.BarcodeTypesToFind.QRCode := true;

// Setup possible barcode orientations ( ato support rotated images)
// see BarCode Reader SDK - OrientationType enum for more variations
// uncomment to support more orientations like right to left
{
reader.Orientation :=
1 or //OrientationType.HorizontalFromLeftToRight
16 or // OrientationType.HorizontalFromRightToLeft
32768 or // OrientationType.VerticalFromBottomToTop
2; // OrientationType.VerticalFromTopToBottom;
}

// uncomment to enable processing of negative barcodes (white bars on dark background)
// reader.SearchNegative := true;

// uncomment to Enable Heuristic Mode (try different image processing modes if the default failed).
// Helps on photos with poor lighting conditions.
//reader.HeuristicMode := true;

// define subfolder where we have images
pathWithImages := '.\Images\';
imageType := '*.jpg'; // can also be *.png, *.tiff, *.bmp, *.PDF

// now search for files with images and processing them one by one
if FindFirst(pathWithImages + imageType, faAnyFile, SR) = 0 then begin
repeat
if (SR.Attr <> faDirectory) then begin
writeLn(SR.Name);
writeLn('------------------');
// processing the file
reader.ReadFromFile(pathWithImages + SR.Name);
for i := 0 to reader.FoundCount - 1 do begin
writeLn(
'#' + IntToStr(i) + ' barcode with value ' +
reader.GetFoundBarcodeValue(i)+
' at ' + FloatToStr(reader.GetFoundBarCodeLeft(i)) +
',' + FloatToStr(reader.GetFoundBarCodeTop(i))
);
end;
writeLn('------------------');
end;
until FindNext(SR) <> 0;
FindClose(SR);
end;

WriteLn('Press any key to exit...');
ReadLn;

reader := varEmpty;

end.

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next