C# + VB.NET: Barcode Quickstart Barcode Quickstart
using IronBarCode;
using System.Drawing;

// Reading a barcode is easy with IronBarcode!
var resultFromFile = BarcodeReader.Read(@"file/barcode.png"); // From a file
var resultFromBitMap = BarcodeReader.Read(new Bitmap("barcode.bmp")); // From a bitmap
var resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg")); // From an image
var resultFromPdf = BarcodeReader.ReadPdf(@"file/mydocument.pdf"); // From PDF use ReadPdf

// To configure and fine-tune barcode reading, utilize the BarcodeReaderOptions class
var myOptionsExample = new BarcodeReaderOptions
{
    // Choose a reading speed from: Faster, Balanced, Detailed, ExtremeDetail
    // There is a tradeoff in performance as more detail is set
    Speed = ReadingSpeed.Balanced,

    // Reader will stop scanning once a single barcode is found (if set to true)
    ExpectMultipleBarcodes = true,

    // By default, all barcode formats are scanned for
    // Specifying a subset of barcode types to search for would improve performance
    ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,

    // Utilize multiple threads to read barcodes from multiple images in parallel
    Multithreaded = true,

    // Maximum threads for parallelized barcode reading
    // Default is 4
    MaxParallelThreads = 2,

    // The area of each image frame in which to scan for barcodes
    // Specifying a crop area will significantly improve performance and avoid noisy parts of the image
    CropArea = new Rectangle(),

    // Special setting for Code39 barcodes
    // If a Code39 barcode is detected, try to read with both the base and extended ASCII character sets
    UseCode39ExtendedMode = true
};

// Read with the options applied
var results = BarcodeReader.Read("barcode.png", myOptionsExample);

// Create a barcode with one line of code
var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8);

// After creating a barcode, we may choose to resize
myNewBarcode.ResizeTo(400, 100);

// Save our newly-created barcode as an image
myBarcode.SaveAsImage("EAN8.jpeg");

Image myBarcodeImage = myBarcode.Image; // Can be used as Image
Bitmap myBarcodeBitmap = myBarcode.ToBitmap(); // Can be used as Bitmap
Imports IronBarCode
Imports System.Drawing

' Reading a barcode is easy with IronBarcode!
Private resultFromFile = BarcodeReader.Read("file/barcode.png") ' From a file
Private resultFromBitMap = BarcodeReader.Read(New Bitmap("barcode.bmp")) ' From a bitmap
Private resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg")) ' From an image
Private resultFromPdf = BarcodeReader.ReadPdf("file/mydocument.pdf") ' From PDF use ReadPdf

' To configure and fine-tune barcode reading, utilize the BarcodeReaderOptions class
Private myOptionsExample = New BarcodeReaderOptions With {
	.Speed = ReadingSpeed.Balanced,
	.ExpectMultipleBarcodes = True,
	.ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,
	.Multithreaded = True,
	.MaxParallelThreads = 2,
	.CropArea = New Rectangle(),
	.UseCode39ExtendedMode = True
}

' Read with the options applied
Private results = BarcodeReader.Read("barcode.png", myOptionsExample)

' Create a barcode with one line of code
Private myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8)

' After creating a barcode, we may choose to resize
myNewBarcode.ResizeTo(400, 100)

' Save our newly-created barcode as an image
myBarcode.SaveAsImage("EAN8.jpeg")

Dim myBarcodeImage As Image = myBarcode.Image ' Can be used as Image
Dim myBarcodeBitmap As Bitmap = myBarcode.ToBitmap() ' Can be used as Bitmap

<p>IronBarCode supports various standard formats, from image files (jpeg, png, and jpg) to more programmatic formats where you would want to pass the variables around, such as a bitmap. Furthermore, it also supports external formats such as PDF, allowing IronBarCode to integrate seamlessly in any codebase, giving developers flexibility with file formats and variables.</p> <p>Aside from being a barcode reader for all file formats, IronBarcode also doubles as a barcode generator that supports all standard encoding and formatting, such as the <code>EAN8</code>, <code>Code128</code> and <code>Code39</code>. Setting the barcode generator up only takes two lines of code. With a low barrier of entry and plenty of customization options for developers, IronBarCode is the number one choice for all situations related to barcodes.</p> <div class="hsg-featured-snippet examples__featured-snippet"> <h2>Barcode Reader and Barcode Generator in C&num;</h2> <ol> <li><code>var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8);</code></li> <li><code>Image myBarcodeImage = myBarcode.Image;</code></li> <li><code>myBarcode.ResizeTo(400, 100);</code></li> <li><code>var resultFromFile = BarcodeReader.Read(@"file/barcode.png");</code></li> <li><code>var myOptionsExample = new BarcodeReaderOptions{...}</code></li> </ol> </div> <h3 id="anchor-barcodewriter">BarcodeWriter</h3> <p>We first import the <code>IronBarCode</code> and <code>System.Drawing</code> and instantiate <code>BarcodeWriter</code> to create a barcode with the string value of <code>12345</code> with the format of <code>EAN8</code>. We then save the generated barcode as an image in the desired format. There are various options for this as IronBarCode supports creating the barcode as an <code>Image</code> as well as a <code>Bitmap</code>.</p> <h4 id="anchor-advanced-barcodewriter">Advanced BarcodeWriter</h4> <p>As seen from above, generating a barcode using IronBarCode requires only two lines of code and saving it as a file for later usage. IronBarCode further extends this by providing developers with a plethora of options to customize the barcode to match the situation.</p> <p>We can use the <code>ResizeTo</code> method and pass in the height and width to resize the barcode image.</p> <h3 id="anchor-barcode-reader">Barcode Reader</h3> <p>Like the above, we first instantiate <code>BarcodeReader</code>, pass the file path to the <code>Read</code> method, and save it as a variable to use later and manipulate the barcode object. There are specified methods for reading external formats such as PDF with <code>ReadPDF</code>; however, for general image formats and bitmaps, we would use <code>Read</code>.</p> <h4 id="anchor-barcodereaderoptions">BarcodeReaderOptions</h4> <p>IronBarCode allows developers to scan barcodes from standard file format. However, there are situations where the developers want to fine-tune the behavior of the <code>Read</code> method, especially in cases where it is reading a batch of barcode files programmatically. This is where <code>BarcodeReaderOptions</code> comes in. IronPDF lets you fully customize things such as the speed at which it reads with <code>Speed</code>, whether they are multiple barcodes expected on the file with <code>ExpectedMultipleBarcodes</code>, and what kind of barcodes they are with the property <code>ExpectBarcodeTypes</code>. Allowing developers to run multiple threads to read barcodes from multiple images in parallel and the number of threads used when doing parallel reading.</p> <p>These are just some of the properties that showcase the power of IronBarCode, for a complete list, please refer to the documentation <a href="/csharp/barcode/object-reference/api/IronBarCode.BarcodeReaderOptions.html" target="_blank">here</a></p> <p><a href="/csharp/barcode/how-to/read-barcodes-from-images/" class="code_content__related-link__doc-cta-link">Click here to view the How-to-Guide, including examples, sample code and files</a></p>

C# + VB.NET: Imperfect Barcodes and Image Correction Imperfect Barcodes and Image Correction
using IronBarCode;
using IronSoftware.Drawing;
using System.Linq;

// Choose which filters are to be applied (in order)
// Set SaveAtEachIteration = true to save the intermediate image data after each filter is applied
var filtersToApply = new ImageFilterCollection(SaveAtEachIteration: true) {
    new SharpenFilter(),
    new InvertFilter(),
    new ContrastFilter(),
    new BrightnessFilter(),
    new AdaptiveThresholdFilter(),
    new BinaryThresholdFilter(),
    new GaussianBlurFilter(),
    new MedianBlurFilter(),
    new BilateralFilter()
};

BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
    // Set chosen filters in BarcodeReaderOptions
    ImageFilters = filtersToApply,

    Speed = ReadingSpeed.Balanced,
    ExpectMultipleBarcodes = true,
};

// Read with the options applied
BarcodeResults results = BarcodeReader.Read("screenshot.png", myOptionsExample);

AnyBitmap[] filteredImages = results.FilterImages();

// Export intermediate image files to disk
for (int i = 0 ; i < filteredImages.Length ; i++)
    filteredImages[i].SaveAs($"{i}_barcode.png");

// Or
results.ExportFilterImagesToDisk("filter-result.jpg");
Imports IronBarCode
Imports IronSoftware.Drawing
Imports System.Linq

' Choose which filters are to be applied (in order)
' Set SaveAtEachIteration = true to save the intermediate image data after each filter is applied
Private filtersToApply = New ImageFilterCollection(SaveAtEachIteration:= True) From {
	New SharpenFilter(),
	New InvertFilter(),
	New ContrastFilter(),
	New BrightnessFilter(),
	New AdaptiveThresholdFilter(),
	New BinaryThresholdFilter(),
	New GaussianBlurFilter(),
	New MedianBlurFilter(),
	New BilateralFilter()
}

Private myOptionsExample As New BarcodeReaderOptions() With {
	.ImageFilters = filtersToApply,
	.Speed = ReadingSpeed.Balanced,
	.ExpectMultipleBarcodes = True
}

' Read with the options applied
Private results As BarcodeResults = BarcodeReader.Read("screenshot.png", myOptionsExample)

Private filteredImages() As AnyBitmap = results.FilterImages()

' Export intermediate image files to disk
For i As Integer = 0 To filteredImages.Length - 1
	filteredImages(i).SaveAs($"{i}_barcode.png")
Next i

' Or
results.ExportFilterImagesToDisk("filter-result.jpg")

<p>IronBarcode offers many image pre-processing filters to choose from that are easily applied with in <code>BarcodeReaderOptions</code>. Select the filters that may improve reading of your image such as <em>Sharpen</em>, <em>Binary Threshold</em>, and <em>Contrast</em>. Please keep in mind that the order in which you choose them are the order that they are applied.</p> <p>There is the option of saving the image data of the intermediate images with each filter applied. This can be toggled with the <code>SaveAtEachIteration</code> property of <code>ImageFilterCollection</code>.</p>

C# + VB.NET: Creating Barcodes Images Creating Barcodes Images
using IronBarCode;
using System.Drawing;

/*** CREATING BARCODE IMAGES ***/

// Create and save a barcode in a single line of code
BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8).ResizeTo(400, 100).SaveAsImage("EAN8.jpeg");

/*****  IN-DEPTH BARCODE CREATION OPTIONS *****/

// BarcodeWriter.CreateBarcode creates a GeneratedBarcode which can be styled and exported as an Image object or file
GeneratedBarcode MyBarCode = BarcodeWriter.CreateBarcode("Any Number, String or Binary Value", BarcodeWriterEncoding.Code128);

// Style the Barcode in a fluent LINQ-style fashion
MyBarCode.ResizeTo(300, 150).SetMargins(20).AddAnnotationTextAboveBarcode("Example EAN8 Barcode").AddBarcodeValueTextBelowBarcode();
MyBarCode.ChangeBackgroundColor(Color.LightGoldenrodYellow);

// Save the barcode as an image file
MyBarCode.SaveAsImage("MyBarCode.png");
MyBarCode.SaveAsGif("MyBarCode.gif");
MyBarCode.SaveAsHtmlFile("MyBarCode.html");
MyBarCode.SaveAsJpeg("MyBarCode.jpg");
MyBarCode.SaveAsPdf("MyBarCode.Pdf");
MyBarCode.SaveAsPng("MyBarCode.png");
MyBarCode.SaveAsTiff("MyBarCode.tiff");
MyBarCode.SaveAsWindowsBitmap("MyBarCode.bmp");

// Save the barcode as a .NET native object
Image MyBarCodeImage = MyBarCode.Image;
Bitmap MyBarCodeBitmap = MyBarCode.ToBitmap();

byte[] PngBytes = MyBarCode.ToPngBinaryData();

using (System.IO.Stream PdfStream = MyBarCode.ToPdfStream())
{
    // Stream barcode image output also works for GIF, JPEG, PDF, PNG, BMP and TIFF
}

// Save MyBarCode as an HTML file or tag
MyBarCode.SaveAsHtmlFile("MyBarCode.Html");
string ImgTagForHTML = MyBarCode.ToHtmlTag();
string DataURL = MyBarCode.ToDataUrl();

// Save MyBarCode to a new PDF, or stamp it in any position on any page(s) of an existing document
MyBarCode.SaveAsPdf("MyBarCode.Pdf");
MyBarCode.StampToExistingPdfPage("ExistingPDF.pdf", 200, 50, 1);  // Position (200, 50) on page 1
MyBarCode.StampToExistingPdfPages("ExistingPDF.pdf", 200, 50, new[] { 1, 2, 3 }, "Password123");  // Multiple pages of an encrypted PDF
Imports IronBarCode
Imports System.Drawing

'''* CREATING BARCODE IMAGES **

' Create and save a barcode in a single line of code
BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8).ResizeTo(400, 100).SaveAsImage("EAN8.jpeg")

'''***  IN-DEPTH BARCODE CREATION OPTIONS ****

' BarcodeWriter.CreateBarcode creates a GeneratedBarcode which can be styled and exported as an Image object or file
Dim MyBarCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("Any Number, String or Binary Value", BarcodeWriterEncoding.Code128)

' Style the Barcode in a fluent LINQ-style fashion
MyBarCode.ResizeTo(300, 150).SetMargins(20).AddAnnotationTextAboveBarcode("Example EAN8 Barcode").AddBarcodeValueTextBelowBarcode()
MyBarCode.ChangeBackgroundColor(Color.LightGoldenrodYellow)

' Save the barcode as an image file
MyBarCode.SaveAsImage("MyBarCode.png")
MyBarCode.SaveAsGif("MyBarCode.gif")
MyBarCode.SaveAsHtmlFile("MyBarCode.html")
MyBarCode.SaveAsJpeg("MyBarCode.jpg")
MyBarCode.SaveAsPdf("MyBarCode.Pdf")
MyBarCode.SaveAsPng("MyBarCode.png")
MyBarCode.SaveAsTiff("MyBarCode.tiff")
MyBarCode.SaveAsWindowsBitmap("MyBarCode.bmp")

' Save the barcode as a .NET native object
Dim MyBarCodeImage As Image = MyBarCode.Image
Dim MyBarCodeBitmap As Bitmap = MyBarCode.ToBitmap()

Dim PngBytes() As Byte = MyBarCode.ToPngBinaryData()

Using PdfStream As System.IO.Stream = MyBarCode.ToPdfStream()
	' Stream barcode image output also works for GIF, JPEG, PDF, PNG, BMP and TIFF
End Using

' Save MyBarCode as an HTML file or tag
MyBarCode.SaveAsHtmlFile("MyBarCode.Html")
Dim ImgTagForHTML As String = MyBarCode.ToHtmlTag()
Dim DataURL As String = MyBarCode.ToDataUrl()

' Save MyBarCode to a new PDF, or stamp it in any position on any page(s) of an existing document
MyBarCode.SaveAsPdf("MyBarCode.Pdf")
MyBarCode.StampToExistingPdfPage("ExistingPDF.pdf", 200, 50, 1) ' Position (200, 50) on page 1
MyBarCode.StampToExistingPdfPages("ExistingPDF.pdf", 200, 50, { 1, 2, 3 }, "Password123") ' Multiple pages of an encrypted PDF

<p>In this example we see that barcodes of many different types and formats can be created, resized, and saved; possibly even in a single line of code.</p> <p>Using our fluent API, the generated barcode class can be used to set margins, resize, and annotate barcodes. They may then be saved as images with IronBarcode automatically assuming the correct image type from a file name: <strong>GIFs, HTML files, HTML tags, JPEGs, PDFs, PNGs, TIFFs, and Windows Bitmaps</strong>.</p> <p>We also have the <code>StampToExistingPdfPage</code> method, which allows a barcode to be generated and stamped onto an existing PDF. This is useful when editing a generic PDF or adding an internal identification number to a document via a barcode.</p>

C# + VB.NET: Barcode Styling & Annotation Barcode Styling & Annotation
using IronBarCode;
using System;
using System.Drawing;

/*** STYLING GENERATED BARCODES  ***/

// BarcodeWriter.CreateBarcode creates a GeneratedBarcode object which allows the barcode to be styled and annotated.
GeneratedBarcode MyBarCode = BarcodeWriter.CreateBarcode("Iron Software", BarcodeWriterEncoding.QRCode);

// Any text (or commonly, the value of the barcode) can be added to the image in a default or specified font.
// Text positions are automatically centered, above or below. Fonts that are too large for a given image are automatically scaled down.
MyBarCode.AddBarcodeValueTextBelowBarcode();
MyBarCode.AddAnnotationTextAboveBarcode("This is My Barcode", new Font(new FontFamily("Arial"), 12, FontStyle.Regular, GraphicsUnit.Pixel), Color.DarkSlateBlue);

// Resize, add margins and check final image dimensions
MyBarCode.ResizeTo(300, 300); // Resize in pixels
MyBarCode.SetMargins(0, 20, 0, 20); // Set margins in pixels

int FinalWidth = MyBarCode.Width;
int FinalHeight = MyBarCode.Height;

// Recolor the barcode and its background
MyBarCode.ChangeBackgroundColor(Color.LightGray);
MyBarCode.ChangeBarCodeColor(Color.DarkSlateBlue);
if (!MyBarCode.Verify())
{
    Console.WriteLine("Color contrast should be at least 50% or a barcode may become unreadable. Test using GeneratedBarcode.Verify()");
}

// Finally, save the result
MyBarCode.SaveAsHtmlFile("StyledBarcode.html");

/*** STYLING BARCODES IN A SINGLE LINQ-STYLE EXPRESSION ***/

// Create a barcode in one line of code
BarcodeWriter.CreateBarcode("https://ironsoftware.com", BarcodeWriterEncoding.Aztec).ResizeTo(250, 250).SetMargins(10).AddBarcodeValueTextAboveBarcode().SaveAsImage("StyledBarcode.png");

/*** STYLING QR CODES WITH LOGO IMAGES OR BRANDING ***/

// Use the QRCodeWriter.CreateQrCodeWithLogo Method instead of BarcodeWriter.CreateBarcode
// Logo will automatically be sized appropriately and snapped to the QR grid.

var qrCodeLogo = new QRCodeLogo("ironsoftware_logo.png");
GeneratedBarcode myQRCodeWithLogo = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo);
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen);
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen);
myQRCodeWithLogo.SaveAsPng("QRWithLogo.Png").SaveAsPdf("MyVerifiedQR.html"); // Save as 2 different formats
Imports IronBarCode
Imports System
Imports System.Drawing

'''* STYLING GENERATED BARCODES  **

' BarcodeWriter.CreateBarcode creates a GeneratedBarcode object which allows the barcode to be styled and annotated.
Private MyBarCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("Iron Software", BarcodeWriterEncoding.QRCode)

' Any text (or commonly, the value of the barcode) can be added to the image in a default or specified font.
' Text positions are automatically centered, above or below. Fonts that are too large for a given image are automatically scaled down.
MyBarCode.AddBarcodeValueTextBelowBarcode()
MyBarCode.AddAnnotationTextAboveBarcode("This is My Barcode", New Font(New FontFamily("Arial"), 12, FontStyle.Regular, GraphicsUnit.Pixel), Color.DarkSlateBlue)

' Resize, add margins and check final image dimensions
MyBarCode.ResizeTo(300, 300) ' Resize in pixels
MyBarCode.SetMargins(0, 20, 0, 20) ' Set margins in pixels

Dim FinalWidth As Integer = MyBarCode.Width
Dim FinalHeight As Integer = MyBarCode.Height

' Recolor the barcode and its background
MyBarCode.ChangeBackgroundColor(Color.LightGray)
MyBarCode.ChangeBarCodeColor(Color.DarkSlateBlue)
If Not MyBarCode.Verify() Then
	Console.WriteLine("Color contrast should be at least 50% or a barcode may become unreadable. Test using GeneratedBarcode.Verify()")
End If

' Finally, save the result
MyBarCode.SaveAsHtmlFile("StyledBarcode.html")

'''* STYLING BARCODES IN A SINGLE LINQ-STYLE EXPRESSION **

' Create a barcode in one line of code
BarcodeWriter.CreateBarcode("https://ironsoftware.com", BarcodeWriterEncoding.Aztec).ResizeTo(250, 250).SetMargins(10).AddBarcodeValueTextAboveBarcode().SaveAsImage("StyledBarcode.png")

'''* STYLING QR CODES WITH LOGO IMAGES OR BRANDING **

' Use the QRCodeWriter.CreateQrCodeWithLogo Method instead of BarcodeWriter.CreateBarcode
' Logo will automatically be sized appropriately and snapped to the QR grid.

Dim qrCodeLogo As New QRCodeLogo("ironsoftware_logo.png")
Dim myQRCodeWithLogo As GeneratedBarcode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo)
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen)
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen)
myQRCodeWithLogo.SaveAsPng("QRWithLogo.Png").SaveAsPdf("MyVerifiedQR.html") ' Save as 2 different formats

<p>In this sample, we see that barcodes may be annotated with text of your choosing or the barcode's own value using any typeface which is installed on the target machine. If that typeface is not available, an appropriate similar typeface will be chosen. Barcodes may be resized, have margins added, and both the barcode and the background may be recolored. They may then be saved as an appropriate format.</p> <p>In the final few lines of code, you can see that using our fluent style operators, it's possible to create and style a barcode in only a few lines of code, similar to <code>System.Linq</code>.</p>

C# + VB.NET: Export Barcodes as HTML Export Barcodes as HTML
using IronBarCode;

GeneratedBarcode MyBarCode = BarcodeWriter.CreateBarcode("1234567890", BarcodeWriterEncoding.Code128);

// Save as a stand-alone HTML file without any image assets
MyBarCode.SaveAsHtmlFile("MyBarCode.html");

// Save as a stand-alone HTML image tag which can be served in HTML files, ASPX or MVC Views. No image assets required, the tag embeds the entire image in its source content
string ImgTag = MyBarCode.ToHtmlTag();

// Turn the image into a HTML/CSS Data URI.
string DataURI = MyBarCode.ToDataUrl();
Imports IronBarCode

Private MyBarCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("1234567890", BarcodeWriterEncoding.Code128)

' Save as a stand-alone HTML file without any image assets
MyBarCode.SaveAsHtmlFile("MyBarCode.html")

' Save as a stand-alone HTML image tag which can be served in HTML files, ASPX or MVC Views. No image assets required, the tag embeds the entire image in its source content
Dim ImgTag As String = MyBarCode.ToHtmlTag()

' Turn the image into a HTML/CSS Data URI.
Dim DataURI As String = MyBarCode.ToDataUrl()

<p>IronBarcode has a very useful feature allowing barcodes to be exported as HTML that is self-contained, such that it has no associated image assets. Everything is contained within the HTML file.</p> <p>We may export as an <strong>HTML file</strong>, <strong>HTML image tag</strong> or to a <strong>data URI</strong>.</p>

Human Support related to .NET Barcode Library

Human Support Directly From Our Development Team

Whether it's product, integration or licensing queries, the Iron product development team is on hand to support all of your questions. Get in touch and start a dialog with Iron to make the most of our library in your project.

Ask a Question
Recognizes Barcode Qr related to .NET Barcode Library

Recognizes 1D and 2D Barcodes in .NET Core, .NET Standard and .NET Framework

IronBarcode .NET barcode library reads any type of barcode within the BarcodeEncoding Enum. It recognizes barcodes in .NET Core, .NET Standard and .NET Framework.

To save time and improve efficiency for inventory workflows, IronBarcode recommends one-dimensional (1D) or linear barcodes, including the traditional and established barcode types such as UPC and EAN codes. Points of sale services across the glove usually use UPC (Universal Product Code) barcodes (including its variations UPC-A and UPC-E). It benefits the target consumer by making it easier to identify and track product features in warehouses and at checkout. Where UPCA is limited to having only numerical contentof 12 to 13 digits long, UPCE supports content between 8 to 13 digits.

Like UPC, European markets use EAN barcodes to label consumer goods for point-of-sale scanning. Its variant includes EAN-13 as the default, whereas EAN-8 is used for limited packaging spaces, like candies. In addition to their flexibility, as a high-density barcode, EAN-13 encodes larger data sets compactly.

1D barcodes do not end there.

The automotive and defense industry utilizes Code 39 barcodes. Its title axplains its ability to encode 39 characters (now revised to 43). Similarly, Code 128-character set and high data density. Continuing with logistics, the packaging industry prefers ITF (Interleaved 2 of 5) barcodes to label packaging materials, such as corrugated sheets due to their high printing tolerance. Whereas, MSI is preferred for product indentification and inventory management.

The Pharma industry utilizes Pharmaceutical Binary COde. Whereas RSS 14 (Reduced Space Symbologies) and Databar barcodes are a 1D and 2D barcode hybrid. It is a healthcare favorite to mark small items. Similar to Code 128 barcodes, Codabar is a logistics and healthcare favorite as well. It works without a computer, readable from a dot-matrix printer output.

2D barcodes include Aztec, Data Matrix, Data Bar, IntelligentMail, Maxicode, QR code. Used in different industries, Aztec is used in the transportation industry on tickets and boarding passes with readability in lower resolution. While IntelligentMail is limited to a specific purpose in US Mail, Maxicode is utilized to standardize shipment tracking.

The widest known amongst barcodes is the QR code. It has a plethora of purposes from B2B to B2C due to its flexibility, fault tolerance, readability, various data support such as numeric, alphanumeric, byte/binary, and Kanji.

Once the type is finalized, IronBarcode - the leading barcode generator takes it from there!

See Full Function List
Fast And Polite Behavior related to .NET Barcode Library

Begin Your Barcode Generation and Reading Project with .NET Barcode Reader

Reading barcode types in .NET is now a breeze with IronBarcode's versatile, advanced, and efficient library.

Where do you begin?

Install IronBarcode's NuGet package or manually install the DLL to your project or your globally assembly cache. You are now one step closer to producing a C# Barcode image scanner application in one live of code. Extract barcode images, values, encoding types, binary data (if any) and then output it all to the console.

TryHarder - Deeper Scans for Skewed Barcode Formats

Adding IronBarcode's TryHarder variable to the QuicklyReadOneBarcode method makes the application try harder, albeit consuming more time, but more thoroughly for analyzing obscured, skewed, or corrupted QR code image formats.

Feel Free to Specify Multiple Formats

You can specify barcode encoding(s) that you are looking for, or specify multiple formats - IronBarcode empowers you with unlimited barcode analysis tools.

You can improve barcode reading performance and accuracy. You can specify various barcode formats simultaneously with the pipe character or 'Bitwize OR'. Alternatively, achieve more specificity and quality with the BarcodeReader.ReadASingleBarcode Method.

Read Barcodes from PDF Documents, to Scans, to Multithreading

If your next project is reading a scanned PDF document and looking for all the 1D barcodes, again IronBarcode will not disappoint. It is similar to reading a single barcode from a single document, except now there is added information about the page number the barcode belongs to.

Similarly, the same result is achieved from a multi-frame TIFF. It is treated similarly to a PDF in this respect.

Is multithreading bothering you? If so, it is supported with IronBarcode!

To read mulitple documents, you can achieve better results with IronBarcode, by creating a list of documents and using the BarcodeReader.ReadBarcodesMultithreaded method. This uses multiple threads and potentially all your CPU cores for the barcode scanning process and can be exponentially faster than reading barcodes one at a time.

Worrying about Imperfect Images is in the Past with Perfect Barcode Generator

In the real world, users may wish to scan a barcode that is not perfect screenshots or PNG images or photographs. Conventional open source .NET barcode generators and reader libraries would make it impossible to read any less-than-perfect image format. However, IronBarcode makes this incredibly straightforward.

The TryHarder method of QuicklyReadOneBarcode results in IronBarcode to deskew and read barcodes from imperfect digital samples.

Photographs, Scans, and Thumbnails

If a photograph is skewed, set specific barcode rotation and image correction to correct the digital noise, skewness, perspective, and rotation reasonably expected from a cellphone camera.

Similarly, reading QR codes and PDF-417 barcodes from a scanned PDF requires setting an appropriate level of barcode rotation correction and barcode image correction to lightly clean the document. However, caution is practiced by not over-specifying and compromising performance.

If you have a corrupted barcode thumbnail then the IronBarcode reader methods automatically detect barcode images that are too small, and upscales, and cleans all the digital noise associated with thumbnailing; making them readable again.

Things could not have been made easier for a developer!

Learn More
Built For Dot Net related to .NET Barcode Library

Built for easy use in .NET Core Projects

Get started in minutes with a few lines of code. Built for .NET Core, .NET Standard, and Framework as an easy to use single DLL; without dependencies; supporting 32 & 64 bit; in any .NET Language. Use in Web, Cloud, Desktop or Console Applications; supporting Mobile & Desktop devices. You can download the software product from this link.

Built for .NET, C#, QR Codes

Get Started Now
Write Barcodes related to .NET Barcode Library

Summing Up IronBarcode - For Creating and Manipulating Barcode Images

As IronBarcode facilitates the creation, resizing, and saving of various barcode types and formats, there is no reason to not begin with it right away!

With the Fluent API, use the generated barcode class to set margins, resize, and annotate barcodes. Then save as images with IronOCR automatically assuming the correct image type from a file name. Whether it is GIF, HTML file, HTML tag, JPEG, PNG, TIFF, and Windows Bitmaps.

The StampToExistingPdfPage method allows a barcode to be generated and stamped onto an existing PDF. It is useful when editing a generic PDF or adding an internal identification number to a document via a barcode.

Connect with LIVE 24/7 human support right away. Whether you have a question or require project support; begin with our 30-day trial key, benefit from our broad documentation resource in easy-to-understand English, or benefit from our lifetime licensing from $749.

Learn More
Supports:
  • .NET Core 2.0 and above
  • .NET Framework 4.0 and above support C#, VB, F#
  • Microsoft Visual Studio. .NET Development IDE Icon
  • NuGet Installer Support for Visual Studio
  • JetBrains ReSharper C# language assistant compatible
  • Microsoft Azure C# .NET  hosting platform compatible

Licensing & Pricing

Free community development licenses. Commercial licenses from $749.

Project C# + VB.NET Library Licensing

Project

Developer C# + VB.NET Library Licensing

Developer

Organization C# + VB.NET Library Licensing

Organization

Agency C# + VB.NET Library Licensing

Agency

SaaS C# + VB.NET Library Licensing

SaaS

OEM C# + VB.NET Library Licensing

OEM

View Full License Options  

Barcode & QR Tutorials for C# & VB .NET

Tutorial + Code Examples Reading Barcodes in C# | .NET Tutorial

C# .NET Barcode QR

Frank Walker .NET Product Developer

Read Barcodes & QRs | C# VB .NET Tutorial

See How Frank uses IronBarcode to Read Barcodes from Scans, Photos, & PDF documents inside his C# .NET Barcode Application...

View Frank's Barcode Reading Tutorial
Writing Barcode Tutorial + Code Examples in C# & VB.NET

C# .NET Barcode

Francesca Miller Junior .NET Engineer

Generating Barcode Images in C# or VB.NET

Francesca shares some tips and tricks for writing Barcodes to Images in C# or VB Applications. See how to write the barcodes and all the options available to you with IronBarcode...

See Francesca's Barcode Tutorial
Tutorial + Code Examples VB.NET PDF Creation and Editing | VB.NET & ASP.NET PDF

QR .NET C# VB

Jennifer Wright Application Architecture Lead

Tutorial for Writing QR codes in C# & VB .NET Applications

Jenny's Team use IronBarcode to write thousands of QRs per day. See their tutorial on getting the most out of IronBarcode...

QR Writing Tutorial from Jenny's Team
Thousands of developers use IronBarcode for...

Accounting and Finance Systems

  • # Receipts
  • # Reporting
  • # Invoice Printing
Add PDF Support to ASP.NET Accounting and Finance Systems

Business Digitization

  • # Documentation
  • # Ordering & Labelling
  • # Paper Replacement
C# Business Digitization Use Cases

Enterprise Content Management

  • # Content Production
  • # Document Management
  • # Content Distribution
.NET CMS PDF Support

Data and Reporting Applications

  • # Performance Tracking
  • # Trend Mapping
  • # Reports
C# PDF Reports
Iron Software Enterprise .NET Component Developers

Thousands of corporations, governments, SMEs and developers alike trust Iron software products.

Iron's team have over 10 years experience in the .NET software component market.

Iron Customer Icon
Iron Customer Icon
Iron Customer Icon
Iron Customer Icon
Iron Customer Icon
Iron Customer Icon
Iron Customer Icon
Iron Customer Icon