C# for .NET NuGet sgcPDF included

The .NET Barcode Reader for C#

sgcCapture is a .NET barcode reader for C#: read QR Code, Data Matrix, PDF417 and linear barcodes from images, TIFF and PDF files, scan documents and decode a live camera.

11 formats, 1D and 2D Images, TIFF and PDF pages Views for WinForms, WPF, Avalonia No external library

See pricing →   sgcCapture for Delphi →

Program.cs
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);
            }
        }
    }
}
Output
> ReadBarcodes.exe
cbfQRCode: https://www.esegece.com/products/sgccapture/
cbfGS1_128: (01)09501101530003(17)271231(10)LOT42

The program built for .NET 8 and run on a shipping label with a GS1-128 barcode and a QR Code.

How to Read Barcodes in C#

Create a TsgcCaptureBarcodeReader, call ReadFromFile or ReadFromStream and walk the Results list. Every type is in the esegece.sgcCapture namespace, with the same class names as the Delphi edition.

Several symbols per image

The reader returns every symbol it finds in the image, with the format, the text, the corner points and the page of each one. MaxResults sets the most results to return.

Difficult images

2D symbols are found at any angle, with rotation, perspective, blur, noise and low contrast. TryHarder is for difficult images and TryInverted for light symbols on a dark background.

GS1 data

GS1-128 data is returned as (AI)value text, ready to split into application identifiers and values.

Only what you expect

Formats is a flags value that limits the search to the symbols you expect. All 11 formats are searched by default.

Barcode Formats and File Inputs

Eleven symbologies from the same reader, and every page of TIFF and PDF files.

GroupSupported
Linear barcodesCode 128, Code 39, EAN-13, EAN-8, UPC-A, ITF, Codabar and GS1-128
2D barcodesQR Code, Data Matrix and PDF417
ImagesJPEG, PNG, BMP, PBM, PGM and PPM
TIFFEvery page, CCITT G3 and G4 included
PDFEvery page, vector and scanned, through the sgcPDF .NET packages that come with the download

Barcode Views for WinForms, WPF and Avalonia

A view control shows a still image or the live frames of a TsgcCaptureCamera, with the barcode results drawn on top.

Windows Forms

TsgcCaptureView in esegece.sgcCapture.WinForms, for .NET Framework 4.7.2 and .NET 8 on Windows.

WPF

TsgcWpfCaptureView in esegece.sgcCapture.Wpf, for .NET Framework 4.7.2 and .NET 8, 9 and 10 on Windows.

Avalonia

TsgcAvaloniaCaptureView in esegece.sgcCapture.Avalonia, for .NET 8, 9 and 10.

Scanners, Cameras and OCR on Windows

The same components as the Delphi edition, with no external library to deploy.

Document scanner

TsgcCaptureScanner scans with WIA 2.0 or TWAIN 2.x from the flatbed, the feeder or both sides of the paper, with resolution, colour mode and page size, raises OnPage for every page and saves the pages to PDF.

Camera

TsgcCaptureCamera captures live video with Media Foundation and decodes the barcodes of the frames while they arrive, with OnBarcode, DuplicateInterval, OnFrame and Snapshot.

OCR and searchable PDF

TsgcCaptureOCR recognises text with the OCR engine of Windows 10 and later, and MakeSearchablePDF turns images, TIFF pages, PDF files or scanned pages into searchable PDF files.

PDF writer

TsgcCapturePDFWriter writes scanned pages to PDF in their most compact form, JPEG as it is and bilevel pages as 1 bit images, with an optional OCR text layer and PDF/A-2b output. It runs on Windows, Linux and macOS.

Install the .NET Barcode Reader from NuGet

esegece.sgcCapture holds the reader, the scanner, the camera, the OCR and the PDF writer, for .NET Standard 2.0, .NET Framework 4.7.2 and .NET 6 to 10. Add the package of your UI framework for the view control.

dotnet add package esegece.sgcCapture
dotnet add package esegece.sgcCapture.WinForms
dotnet add package esegece.sgcCapture.Wpf
dotnet add package esegece.sgcCapture.Avalonia

The packages ship with sgcUI .NET 2026.12.0 and need a Registered license. The full list is on the sgcCapture download page, and the .NET overview explains the components. The .NET demos are CaptureCLI for Windows, Linux and macOS, BarcodeReader for Windows Forms, WPF and Avalonia, and Scanner and Camera for Windows Forms.

Licensing

The sgcCapture .NET packages are Registered only: there is no Community edition. sgcCapture is built on sgcPDF, and the sgcCapture .NET download includes the sgcPDF .NET packages, so no separate sgcPDF license is needed. sgcCapture is also part of sgcUI Enterprise and the All-Access bundle.

sgcCapture .NET

€299

Single, Team and Site licenses available.

  • Reader, scanner, camera, OCR and PDF writer
  • WinForms, WPF and Avalonia view packages
  • sgcPDF .NET packages included
  • Full source code
  • 1 year of updates, and a 50% to 70% renewal discount

.NET Barcode Reader Questions

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.

Yes, for the barcode reader, the image and PDF input and the PDF writer: the CaptureCLI demo reads barcodes and writes image PDF files on Windows, Linux and macOS. The scanner, the camera and the OCR are Windows only.

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.

No. The sgcCapture .NET packages are Registered only. A Single, Team or Site license includes full source code, 1 year of updates and the sgcPDF .NET packages.

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.

Best value: All-AccessEvery eSeGeCe product, Premium Support included, from €1,059/year.
See All-Access pricing

Read Barcodes in Your .NET Application

Read QR Code, Data Matrix, PDF417 and linear barcodes in C#, from images, TIFF and PDF files, with one NuGet package.