Delphi, C++ Builder & .NET Part of sgcUI

sgcCapture, the Delphi Barcode Reader and Document Capture

Read barcodes from images, TIFF and PDF files, scan documents, decode a live camera and make searchable PDF files, with no external library.

11 formats, 1D and 2DImages, TIFF and PDF pagesWIA, TWAIN, camera and OCRIncluded in sgcUI Enterprise

See pricing →   Barcode reader for .NET →

ReadLabel.dpr
program ReadLabel;

{$APPTYPE CONSOLE}

uses
  sgcCapture_Types, sgcCapture_Reader;

var
  oReader: TsgcCaptureBarcodeReader;
  i: Integer;
begin
  oReader := TsgcCaptureBarcodeReader.Create(nil);
  try
    oReader.TryHarder := True;
    oReader.ReadFromFile('shipping-label.png');
    for i := 0 to oReader.Results.Count - 1 do
      WriteLn(oReader.Results[i].Text);
  finally
    oReader.Free;
  end;
end.
Output
> ReadLabel.exe
https://www.esegece.com/products/sgccapture/
(01)09501101530003(17)271231(10)LOT42

The program compiled with Delphi 13 and run on a shipping label with a GS1-128 barcode and a QR Code.

sgcCapture is a barcode reader and document capture library for Delphi, C++ Builder and .NET. It uses no external library: no barcode or OCR SDK to deploy and no runtime fees.

Barcodes, Scanners, Cameras and OCR

Five non visual components and the VCL and FireMonkey view controls on the sgcCapture palette page. The highlights below, and the feature matrix lists every feature.

Read barcodes

One reader for linear and 2D symbols, from files, streams and PDF pages.

Barcode reader

11 formats, several symbols per image

Labels, invoices, tickets and delivery notes carry more than one barcode, printed at any angle and photographed in poor light. TsgcCaptureBarcodeReader reads Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF, Codabar, QR Code, Data Matrix, PDF417 and GS1-128, finds several symbols in one image and returns the text, the format, the corner points and the page of each one.

  • 2D symbols at any angle, with rotation, perspective, blur, noise and low contrast
  • TryHarder for difficult images and TryInverted for light symbols on a dark background
  • GS1 data returned as (AI)value text
  • Formats limits the search to the symbols you expect, all 11 by default

Inputs

Images, multipage TIFF and PDF pages

Scanned batches arrive as multipage TIFF files and documents as PDF. ReadFromFile and ReadFromStream read JPEG, PNG, BMP, PBM, PGM and PPM images, every page of a TIFF file, CCITT G3 and G4 included, and every page of a PDF file, vector and scanned. TsgcCaptureImage loads the same images and rotates, resizes, inverts and converts them to gray.

  • The page of every result, for TIFF and PDF files
  • Barcodes drawn as vectors in a PDF page and barcodes in a scanned page
  • The same code on Windows, macOS, Linux, iOS and Android

Scan and capture

Paper from a scanner and frames from a camera, on Windows.

Document scanner

WIA 2.0 and TWAIN 2.x scanning

TsgcCaptureScanner scans documents from the flatbed, the feeder or both sides of the paper, with the resolution, colour mode and page size you set. It fires OnPage for every page, so each page can be processed as soon as it arrives, and saves the pages to PDF.

  • WIA 2.0 and TWAIN 2.x drivers
  • Flatbed, feeder and duplex
  • Scan to PDF with TsgcCapturePDFWriter

Camera

Live barcode decoding from a camera

TsgcCaptureCamera captures live video with Media Foundation and decodes the barcodes of the frames while they arrive. OnBarcode fires for every symbol read, DuplicateInterval stops the same symbol from firing again and again, and OnFrame and Snapshot give the images themselves.

  • A QR Code in a 720p frame in 10 ms, all 11 formats in 27 ms (quiet machine, Win32)
  • A Reader property with the same options as the barcode reader
  • The frames shown in TsgcCaptureView with the results drawn on top

Searchable PDF

Text recognition and compact scan to PDF files.

OCR

Text recognition with the Windows OCR engine

TsgcCaptureOCR recognises text with the OCR engine of Windows 10 and later, so there is no OCR library to install. MakeSearchablePDF turns images, every page of a TIFF file, PDF files or scanned pages into searchable PDF files, with the text in an invisible layer over the page image.

  • Windows 10 and later
  • Images, TIFF files, PDF files and scanned pages
  • The SearchablePDF demo for Delphi

PDF writer

Scan to PDF and PDF/A-2b

TsgcCapturePDFWriter writes every page image in its most compact form: a JPEG is embedded as it is, and a bilevel page is written as a 1 bit image. It adds an optional invisible OCR text layer and writes PDF/A-2b for archives.

  • JPEG pass through and 1 bit pages
  • An optional OCR text layer
  • Runs on every platform, built on sgcPDF

Show the results

View controls for VCL, FireMonkey, WinForms, WPF and Avalonia.

View controls

A still image or a live camera, with the symbols drawn on top

TsgcCaptureView for the VCL and TsgcCaptureViewFMX for FireMonkey show a still image or the live frames of a TsgcCaptureCamera, with the barcode results drawn on top. In .NET, the same control is TsgcCaptureView for Windows Forms, TsgcWpfCaptureView for WPF and TsgcAvaloniaCaptureView for Avalonia.

  • VCL and FireMonkey (Delphi XE5 and later)
  • Windows Forms, WPF and Avalonia

Who Builds with sgcCapture

Warehouses and logistics

Receiving and picking applications read the GS1-128, EAN and QR Code labels of parcels from a camera or from photos, several labels in one image, and return the GS1 data as application identifiers and values.

  • Live camera
  • GS1-128
  • Several symbols
Run the Camera demo

Document intake and archiving

Back offices scan batches from the feeder, split them at barcode separator pages and archive every document as a searchable PDF/A-2b file.

  • WIA and TWAIN
  • OCR
  • PDF/A-2b
Run the Scanner demo

Barcodes in files on a server

Services read the barcodes of uploaded images, multipage TIFF files and PDF invoices in a console program or a Linux daemon, with the same reader as the desktop.

  • TIFF and PDF pages
  • Linux
  • No external library
Run the CaptureCLI demo

Read the Barcodes of a File in a Few Lines

The same API in Delphi, C++ Builder and C#: create the reader, call ReadFromFile and walk the results. Each sample below was compiled and run on a shipping label with a GS1-128 barcode and a QR Code.

A console program that reads the GS1-128 barcode and the QR Code of a shipping label and prints the format and the text of each one.

program ReadBarcodes;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  sgcCapture_Types, sgcCapture_Reader;

const
  CS_FORMATS: array [TsgcCaptureBarcodeFormat] of string = ('Code 128',
    'Code 39', 'EAN-13', 'EAN-8', 'UPC-A', 'ITF', 'Codabar', 'QR Code',
    'Data Matrix', 'PDF417', 'GS1-128');

var
  oReader: TsgcCaptureBarcodeReader;
  oResult: TsgcCaptureBarcodeResult;
  i: Integer;
begin
  oReader := TsgcCaptureBarcodeReader.Create(nil);
  try
    // all 11 formats by default; here only the formats of the label
    oReader.Formats := [cbfGS1_128, cbfQRCode];
    oReader.TryHarder := True;
    // JPEG, PNG, BMP, TIFF and PDF files: every page is read
    oReader.ReadFromFile('shipping-label.png');
    for i := 0 to oReader.Results.Count - 1 do
    begin
      oResult := oReader.Results[i];
      WriteLn(CS_FORMATS[oResult.Format], ': ', oResult.Text);
    end;
  finally
    oReader.Free;
  end;
end.

Read the help topic →

The same program in C++ Builder with the generated sgcCapture headers.

#include <System.hpp>
#pragma hdrstop
#include <stdio.h>
#include "sgcCapture_Types.hpp"
#include "sgcCapture_Reader.hpp"

static const char *CS_FORMATS[] = {"Code 128", "Code 39", "EAN-13", "EAN-8",
  "UPC-A", "ITF", "Codabar", "QR Code", "Data Matrix", "PDF417", "GS1-128"};

int main()
{
  TsgcCaptureBarcodeReader *oReader = new TsgcCaptureBarcodeReader(NULL);
  try
  {
    // all 11 formats by default; here only the formats of the label
    oReader->Formats = TsgcCaptureBarcodeFormats() << cbfGS1_128 << cbfQRCode;
    oReader->TryHarder = true;
    // JPEG, PNG, BMP, TIFF and PDF files: every page is read
    oReader->ReadFromFile("shipping-label.png");
    for (int i = 0; i < oReader->Results->Count; i++)
    {
      TsgcCaptureBarcodeResult *oResult = oReader->Results->Items[i];
      printf("%s: %s\n", CS_FORMATS[oResult->Format],
        AnsiString(oResult->Text).c_str());
    }
  }
  __finally
  {
    delete oReader;
  }
  return 0;
}

Read the help topic →

The same program in C# with the esegece.sgcCapture package.

using System;
using esegece.sgcCapture;

class Program
{
    static void Main()
    {
        using (TsgcCaptureBarcodeReader oReader = new TsgcCaptureBarcodeReader())
        {
            // all 11 formats by default; here only the formats of the label
            oReader.Formats = TsgcCaptureBarcodeFormats.cbfGS1_128 |
                TsgcCaptureBarcodeFormats.cbfQRCode;
            oReader.TryHarder = true;
            // JPEG, PNG, BMP, TIFF and PDF files: every page is read
            oReader.ReadFromFile("shipping-label.png");
            for (int i = 0; i < oReader.Results.Count; i++)
            {
                TsgcCaptureBarcodeResult oResult = oReader.Results[i];
                Console.WriteLine(oResult.Format + ": " + oResult.Text);
            }
        }
    }
}

More about the .NET barcode reader →

Run the sgcCapture Demos

The Delphi and C++ Builder demos install in Demos\Capture. The .NET demos ship with the .NET download. CaptureCLI uses only the RTL and the sgc units, so it builds and runs on Windows and Linux.

BarcodeReader

Opens an image or a PDF file, reads its barcodes and draws the symbols on the page. For the VCL, FireMonkey and C++ Builder, and for Windows Forms, WPF and Avalonia in .NET.

Scanner

Scans with WIA or TWAIN, starts a new document at every barcode separator page and saves the pages as a plain or searchable PDF. For the VCL, C++ Builder and Windows Forms.

Camera

Live video from a camera with the barcodes of the frames read while they arrive. For the VCL and for Windows Forms.

SearchablePDF

Turns images, TIFF files and PDF files into searchable PDF files with the Windows OCR engine.

CaptureCLI

A console program that reads the barcodes of image, TIFF and PDF files, every page, and writes image PDF files. For Delphi on Windows and Linux, C++ Builder, and .NET on Windows, Linux and macOS.

Where sgcCapture Is Included

sgcCapture is in sgcUI Enterprise, and it is also sold on its own. It is built on the sgcPDF engine, and every sgcCapture license includes sgcPDF: the full PDF library, its viewer controls and its source code are installed with it at no extra cost. sgcCapture is also included in the All-Access bundle.

sgcCapture single package

€299 / developer, full source code, 1 year of updates. sgcPDF is included and installed with it.

Buy sgcCapture → See pricing →

sgcCapture .NET

€299 / developer, the NuGet packages with the sgcPDF .NET packages included.

Buy sgcCapture .NET → See .NET pricing →

sgcUI Enterprise

Every sgcUI product, sgcCapture included, from €699.

See Enterprise →

sgcCapture is not part of the sgcUI Community edition, and there is no .NET Community package: the .NET packages are Registered only.

Supported Frameworks and Platforms

Components in sgcCapture

Barcode reader

TsgcCaptureBarcodeReader, with TsgcCaptureImage for the images. Every platform.

Scanner

TsgcCaptureScanner, WIA 2.0 and TWAIN 2.x. Windows.

Camera

TsgcCaptureCamera, Media Foundation. Windows.

OCR

TsgcCaptureOCR, the Windows OCR engine. Windows 10 and later.

PDF writer

TsgcCapturePDFWriter, scan to PDF and PDF/A-2b. Every platform.

Views

TsgcCaptureView (VCL) and TsgcCaptureViewFMX. In .NET, TsgcCaptureView (WinForms), TsgcWpfCaptureView and TsgcAvaloniaCaptureView.

TargetComponentPlatforms
Delphi 7 to 13Reader, image and PDF input, PDF writerWindows, macOS, Linux, iOS and Android
Delphi 7 to 13Scanner, camera and OCRWindows
C++ Builder 2007 to 13The same classesC++ Builder packages and demos
FireMonkeyTsgcCaptureViewFMXDelphi XE5 and later
.NETesegece.sgcCapture.NET Standard 2.0, .NET Framework 4.7.2, .NET 6, 8, 9 and 10
.NET viewsWinForms, WPF and Avalonia packagesWinForms and WPF on Windows, Avalonia on .NET 8, 9 and 10

Frequently Asked Questions

Yes, and every sgcCapture license includes it. sgcCapture reads PDF pages and writes PDF files with the sgcPDF engine, which is installed with sgcCapture at no extra cost. The sgcCapture .NET download includes the sgcPDF .NET packages.

No. sgcCapture uses no external library, no barcode SDK and no OCR SDK, and there are no runtime fees. Text recognition uses the OCR engine that is part of Windows 10 and later.

The barcode reader, the image and PDF input and the PDF writer run on every sgcUI platform: Windows, macOS, Linux, iOS and Android. The scanner, the camera and the OCR are Windows only. Delphi 7 to 13 and C++ Builder 2007 to 13 are supported, FireMonkey from Delphi XE5.

Yes. ReadFromFile reads every page of a PDF file, with barcodes drawn as vectors and barcodes in scanned pages, and every page of a TIFF file. Each result has the page it was found on.

On a quiet machine with a Win32 build, a QR Code in a 720p frame is read in 10 ms, a search for all 11 formats in a 720p frame takes 27 ms, and an A4 page at 300 dpi with all formats takes 0.7 s.

Every symbol written by the encoder is read back, with a 100 percent round trip. The reader decodes 276 of the 276 images of the OpenCV QR Code corpus, and 1,000 images without a barcode give no false 2D read.

sgcCapture ships with sgcUI 2026.12.0. From that release it is in the sgcUI trial, in the setup of every sgcCapture, sgcUI Enterprise and All-Access license, and the .NET packages are in the sgcCapture .NET download. See the download page.

sgcCapture Help

3,000+Developers
20+Years
761+Components
30+API Integrations
5Platforms
30-Day Money-Back GuaranteeNot satisfied? Request a full refund within 30 days of purchase. See refund policy

Try sgcCapture

sgcCapture ships with sgcUI 2026.12.0, together with sgcPDF and every other sgcUI product.