softekbarcodenetstandard 1.14.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package softekbarcodenetstandard --version 1.14.0
NuGet\Install-Package softekbarcodenetstandard -Version 1.14.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="softekbarcodenetstandard" Version="1.14.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add softekbarcodenetstandard --version 1.14.0
#r "nuget: softekbarcodenetstandard, 1.14.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install softekbarcodenetstandard as a Cake Addin
#addin nuget:?package=softekbarcodenetstandard&version=1.14.0

// Install softekbarcodenetstandard as a Cake Tool
#tool nuget:?package=softekbarcodenetstandard&version=1.14.0

Softek Barcode Reader Toolkit for Multi-platforms (Windows x86, Windows x64, Linux x86, Linux x64 and Mac)

Softek Barcode Reader Toolkit for Windows Copyright Softek Software Ltd 2002-2021

Full documentation for the SDK can be downloaded from:

http://www.bardecode.com/download/barcode_sdk/windows/documentation.pdf

Support and trial license email: nuget@bardecode.com

Basic use:

barcode = new SoftekBarcodeNetStandard.BarcodeReader();

// If using PDF then set path to gs

barcode.gsPath = @"/path/to/gs";

nBarCode = barcode.ScanBarCode("inputfile.tif"); // Can be TIF, JPG or PDF

for (int i = 1; i ⇐ nBarCode; i++)

   value = barcode.GetBarString(i);

Setting more options and getting more results:

using (barcode = new SoftekBarcodeNetStandard.BarcodeReader())
{

    // Enter your license key here
    // You can get a trial license key from nuget@bardecode.com
    // Example:
    // barcode.LicenseKey = "MY LICENSE KEY";

    // Turn on the barcode types you want to read.
    // Turn off the barcode types you don't want to read (this will increase the speed of your application)
    barcode.ReadCode128 = true;
    barcode.ReadCode39 = true;
    barcode.ReadCode25 = true;
    barcode.ReadEAN13 = true;
    barcode.ReadEAN8 = true;
    barcode.ReadUPCA = true;
    barcode.ReadUPCE = true;
    barcode.ReadCodabar = false;
    barcode.ReadPDF417 = true;
    barcode.ReadDataMatrix = true;
    barcode.ReadDatabar = true;
    barcode.ReadMicroPDF417 = false;
    barcode.ReadQRCode = true;

    // If you want to read more than one barcode then set Multiple Read to 1
    // Setting MutlipleRead to False will make the recognition faster
    barcode.MultipleRead = true;

    // Noise reduction takes longer but can make it possible to read some difficult barcodes
    // When using noise reduction a typical value is 10 - the smaller the value the more effect it has.
    // A zero value turns off noise reduction. 
    // barcode.NoiseReduction = 0 ;

    // You may need to set a small quiet zone if your barcodes are close to text and pictures in the image.
    // A value of zero uses the default.
    barcode.QuietZoneSize = 0;

    // DeskewMode controls the way in which the toolkit handles skewed documents. At the default level (2) 
    // the toolkit will deskew at the main angle of the whole image. If the bar code is at a different angle
    // to the rest of the image then try 3. For more complex images try values from 4 to 6.
    barcode.DeskewMode = 2;

    // If using PDF then set path to gs
    barcode.gsPath = @"/path/to/gs";

    int nBarCode;

    nBarCode = barcode.ScanBarCode("inputfile.pdf"); // Can be TIF, JPG or PDF

    // Or load into a byte array and use ScanBarCodeFromByteArray
    // byte[] b = File.ReadAllBytes("inputfile.pdf"); // Can be TIF or JPG 
    // nBarCode = barcode.ScanBarCodeFromByteArray(b);

    // Or call ScanBarCodeFromStream

    if (nBarCode <= -6)
    {
        Result.Text += "License key error: either an evaluation key has expired or the license key is not valid for processing pdf documents\r\n";
    }
    else if (nBarCode < 0)
    {
        Console.Write("ScanBarCode returned error number ");
        Console.Write(nBarCode);
        Console.Write("\r\n");
        Console.Write("Last Softek Error Number = ");
        Console.Write(barcode.GetLastError());
        Console.Write("\r\n");
        Console.Write("Last Windows Error Number = ");
        Console.Write(barcode.GetLastWinError());
        Console.Write("\r\n");
    }
    else if (nBarCode == 0)
    {
        Console.WriteLine("No barcode found on this image");
    }
    else
    {
        for (int i = 1; i <= nBarCode; i++)
        {
            string result;
            result = String.Format("Barcode {0}\r\n", i);
            result += String.Format("Value = {0}\r\n", barcode.GetBarString(i));
            result += String.Format("Type = {0}\r\n", barcode.GetBarStringType(i));
            result += String.Format("Quality Score = {0}/5\r\n", barcode.GetBarStringQualityScore(i));
            int nDirection = barcode.GetBarStringDirection(i);
            if (nDirection == 1)
                result += "Direction = Left to Right\r\n";
            else if (nDirection == 2)
                result += "Direction = Top to Bottom\r\n";
            else if (nDirection == 4)
                result += "Direction = Right to Left\r\n";
            else if (nDirection == 8)
                result += "Direction = Bottom to Top\r\n";
            int nPage = barcode.GetBarStringPage(i);
            result += String.Format("Page = {0}\r\n", nPage);
            System.Drawing.Rectangle rect = barcode.GetBarStringRect(i);
            result += String.Format("Top Left = ({0},{1})\r\n", rect.X, rect.Y);
            result += String.Format("Bottom Right = ({0},{1})\r\n", rect.X + rect.Width, rect.Y + rect.Height);
            result += "\r\n";
            Console.Write(result);
        }
    }
}
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.3.1.11 469 2/13/2024
9.3.1.6 683 10/6/2023
9.3.1.5 1,417 9/7/2023
1.35.0 1,949 3/7/2023
1.34.0 801 1/18/2023
1.33.0 448 1/9/2023
1.21.0 1,845 7/13/2022
1.15.0 448 6/3/2022
1.14.0 487 2/11/2022
1.12.0 295 12/14/2021
1.11.0 327 9/27/2021

Based on version 9.1.3 of the Softek Barcode Reader Toolkit for Windows and Linux