Saltar al pie de página
C# + VB.NET: Inicio rápido de códigos de barras Inicio rápido de códigos de barras
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
myBarcode.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
myBarcode.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
Install-Package BarCode

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.

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 EAN8, Code128, and Code39. 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.

Barcode Reader and Barcode Generator in C#

  1. var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeEncoding.EAN8);
  2. Image myBarcodeImage = myBarcode.ToImage();
  3. myBarcode.ResizeTo(400, 100);
  4. var resultFromFile = BarcodeReader.Read(@"file/barcode.png");
  5. var myOptionsExample = new BarcodeReaderOptions { /* Options */ };

Barcode Writer

We first import the necessary libraries such as IronBarCode and System.Drawing, and instantiate BarcodeWriter to create a barcode with the string value of 12345 with the format of EAN8. 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 Image as well as a Bitmap.

Advanced Barcode Writer

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.

We can use the ResizeTo method and pass in the height and width to resize the barcode image.

Barcode Reader

Like the above, we first instantiate BarcodeReader, pass the file path to the Read 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 ReadPDF; however, for general image formats and bitmaps, we would use Read.

BarcodeReaderOptions

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 Read method, especially in cases where it is reading a batch of barcode files programmatically. This is where BarcodeReaderOptions comes in. IronBarCode lets you fully customize things such as the speed at which it reads with Speed, whether multiple barcodes are expected in the file with ExpectedMultipleBarcodes, and what kind of barcodes they are with the property ExpectBarcodeTypes. This allows developers to run multiple threads to read barcodes from multiple images in parallel, as well as control the number of threads used when doing parallel reading.

These are just some of the properties that showcase the power of IronBarCode. For a complete list, please refer to the documentation here.

Learn to Create Barcodes with Our Detailed Guide!

C# + VB.NET: Códigos de Barras Imperfectos y Corrección de Imágenes Códigos de Barras Imperfectos y Corrección de Imágenes
using IronBarCode;
using IronSoftware.Drawing;

// Choose which filters are to be applied (in order)
// Set cacheAtEachIteration = true to save the intermediate image data after each filter is applied
var filtersToApply = new ImageFilterCollection(cacheAtEachIteration: 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

' Choose which filters are to be applied (in order)
' Set cacheAtEachIteration = true to save the intermediate image data after each filter is applied
Private filtersToApply = New ImageFilterCollection(cacheAtEachIteration:= 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")
Install-Package BarCode

IronBarcode offers many image pre-processing filters to choose from that are easily applied within BarcodeReaderOptions. Select the filters that may improve reading of your image such as Sharpen, Binary Threshold, and Contrast. Please keep in mind that the order in which you choose them is the order that they are applied.

There is the option of saving the image data of the intermediate images with each filter applied. This can be toggled with the SaveAtEachIteration property of ImageFilterCollection.

Key Points from the Featured Code Example:

  • We create an instance of BarcodeReaderOptions and configure it with various image filters: Sharpen, Binary Threshold, and Contrast.
  • The filters are added in a specific order, indicating the sequence in which they should be applied.
  • By setting cacheAtEachIteration to true, the library saves intermediate images after each filter application, which is useful for debugging and analysis.
  • Finally, we read the barcode from the image and print the barcode type and value to the console.

Learn More About Image Correction in IronBarcode

C# + VB.NET: Crear imágenes de códigos de barras Crear imágenes de códigos de barras
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
Install-Package BarCode

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.

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: GIFs, HTML files, HTML tags, JPEGs, PDFs, PNGs, TIFFs, and Windows Bitmaps.

We also have the StampToExistingPdfPage 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.

C# + VB.NET: Estilo de código de barras y anotación Estilo de código de barras y anotación
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
Install-Package BarCode

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.

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 System.Linq.

C# + VB.NET: Exportar códigos de barras a HTML Exportar códigos de barras a 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()
Install-Package BarCode

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.

We may export as an HTML file, HTML image tag, or to a data URI.

In this example:

  • We create a barcode using BarcodeWriter.CreateBarcode, specifying the input data and encoding type.
  • We then use different methods provided by IronBarcode to export the barcode:
  • ToHtmlTag() generates an HTML <img> tag that can be embedded in web pages.
  • ToDataUri() creates a data URI string which can be used as a source for <img> tags or virtually anywhere an image URL is needed.
  • SaveAsHtmlFile() saves the barcode as a standalone HTML file, containing all image data inline, making it portable and easy to share.

Human Support related to Biblioteca .NET de Códigos

Soporte Humano Directo Desde Nuestro Equipo de Desarrollo

Ya sean consultas sobre productos, integración o licencias, el equipo de desarrollo de productos Iron está disponible para apoyar todas tus preguntas. Ponerse en contacto y comenzar un diálogo con Iron para aprovechar al máximo nuestra biblioteca en tu proyecto.

Hacer una pregunta
Recognizes Barcode Qr related to Biblioteca .NET de Códigos

Reconoce códigos de barras 1D y 2D en .NET Core, .NET Standard y .NET Framework

La biblioteca de códigos de barras .NET IronBarcode lee cualquier tipo de código de barras dentro del Enum de Codificación de Código de Barras. Reconoce códigos de barras en .NET Core, .NET Standard, y .NET Framework.

Para ahorrar tiempo y mejorar la eficiencia en los flujos de trabajo de inventario, IronBarcode recomienda códigos de barras unidimensionales (1D) o lineales, incluidos los tipos de código de barras tradicionales y establecidos como los códigos UPC y EAN. Los servicios de puntos de venta de todo el mundo suelen utilizar códigos de barras UPC (Código de Producto Universal) (incluyendo sus variaciones UPC-A y UPC-E). Beneficia al consumidor objetivo al facilitar la identificación y seguimiento de las características del producto en almacenes y al momento del pago. Mientras que UPCA está limitado a tener solo contenido numérico de 12 a 13 dígitos, UPCE admite contenido entre 8 y 13 dígitos.

Al igual que UPC, los mercados europeos utilizan códigos de barras EAN para etiquetar bienes de consumo para el escaneo en el punto de venta. Su variante incluye EAN-13 como el predeterminado, mientras que EAN-8 se utiliza para espacios de empaque limitados, como los dulces. Además de su flexibilidad, como un código de barras de alta densidad, EAN-13 codifica conjuntos de datos más grandes de manera compacta.

Los códigos de barras 1D no terminan ahí.

La industria automotriz y de defensa utiliza códigos de barras Code 39. Su título explica su capacidad para codificar 39 caracteres (ahora revisados a 43). De manera similar, el conjunto de caracteres Code 128 y alta densidad de datos. Continuando con la logística, la industria del embalaje prefiere los códigos de barras ITF (Interleaved 2 of 5) para etiquetar materiales de embalaje, como hojas corrugadas debido a su alta tolerancia de impresión. Mientras que, MSI es preferido para la identificación de productos y gestión de inventario.

La industria farmacéutica utiliza el Código Binario Farmacéutico. Mientras que los códigos de barras RSS 14 (Simbologías de Espacio Reducido) y Databar son un híbrido de código de barras 1D y 2D. Es un favorito en el sector sanitario para marcar artículos pequeños. Similar a los códigos de barras Code 128, Codabar también es un favorito en la logística y el cuidado de la salud. Funciona sin una computadora, legible desde una salida de impresora matricial.

Los códigos de barras 2D incluyen Aztec, Data Matrix, Data Bar, IntelligentMail, Maxicode, código QR. Usados en diferentes industrias, Aztec se usa en la industria del transporte en boletos y tarjetas de embarque con legibilidad en baja resolución. Mientras que IntelligentMail está limitado a un propósito específico en el Correo de EE. UU., Maxicode se utiliza para estandarizar el seguimiento de envíos.

El más conocido entre los códigos de barras es el código QR. Tiene una gran cantidad de propósitos, de B2B a B2C, debido a su flexibilidad, tolerancia a fallos, legibilidad, soporte de varios datos como numérico, alfanumérico, byte/binario y Kanji.

Una vez que se finaliza el tipo, IronBarcode, el generador de código de barras líder, se encarga del resto.

Ver Lista Completa de Funciones
Fast And Polite Behavior related to Biblioteca .NET de Códigos

Comience su Proyecto de Generación y Lectura de Códigos de Barras con .NET Barcode Reader

Leer tipos de códigos de barras en .NET ahora es un paseo con la versátil, avanzada y eficiente biblioteca de IronBarcode.

¿Dónde comienza?

Instale el paquete NuGet de IronBarcode o instale manualmente el DLL en su proyecto o en su caché de ensamblado global. Ahora está un paso más cerca de producir una aplicación de escáner de imágenes de código de barras en C# en una línea de código. Extraiga imágenes de códigos de barras, valores, tipos de codificación, datos binarios (si los hay) y luego sáquelo todo a la consola.

TryHarder - Escaneos Más Profundos para Formatos de Código de Barras Torcidos

Agregar la variable TryHarder de IronBarcode al método QuicklyReadOneBarcode hace que la aplicación se esfuerce más, aunque consuma más tiempo, pero de manera más completa para analizar formatos de imágenes de códigos QR oscurecidos, torcidos o corruptos.

Siéntase Libre de Especificar Múltiples Formatos

Puede especificar codificación(es) de código de barras que busca, o especificar múltiples formatos - IronBarcode le empodera con herramientas ilimitadas de análisis de códigos de barras.

Puede mejorar el rendimiento y la exactitud de la lectura de códigos de barras. Puede especificar varios formatos de códigos de barras simultáneamente con el carácter de tubería o 'Bitwize OR'. Alternativamente, logre más especificidad y calidad con el Método BarcodeReader.ReadASingleBarcode.

Leer Códigos de Barras de Documentos PDF, a Escaneos, a Multithreading

Si su próximo proyecto es leer un documento PDF escaneado y buscar todos los códigos de barras 1D, nuevamente IronBarcode no decepcionará. Es similar a leer un solo código de barras de un solo documento, excepto que ahora hay información adicional sobre el número de página al que pertenece el código de barras.

De manera similar, se logra el mismo resultado de un TIFF con múltiples tramas. Se trata de manera similar a un PDF en este aspecto.

¿Le molesta el multithreading? Si es así, ¡es compatible con IronBarcode!

Para leer múltiples documentos, puede lograr mejores resultados con IronBarcode, creando una lista de documentos y utilizando el método BarcodeReader.ReadBarcodesMultithreaded. Esto utiliza múltiples hilos y potencialmente todos los núcleos de su CPU para el proceso de escaneo de códigos de barras y puede ser exponencialmente más rápido que leer códigos de barras uno a la vez.

Preocuparse por Imágenes Imperfectas es Cosa del Pasado con el Generador de Códigos de Barras Perfecto

En el mundo real, los usuarios pueden desear escanear un código de barras que no es perfecto en capturas de pantalla o imágenes PNG o fotografías. Los generadores de códigos de barras convencionales de código abierto .NET y las bibliotecas de lectores lo harían imposible para leer cualquier formato de imagen menos que perfecto. Sin embargo, IronBarcode hace esto increíblemente sencillo.

El método TryHarder de QuicklyReadOneBarcode resulta en hacer que IronBarcode deskew y lea códigos de barras de muestras digitales imperfectas.

Fotografías, Escaneos y Miniaturas

Si una fotografía está torcida, configure la rotación específica del código de barras y la corrección de imagen para corregir el ruido digital, la inclinación, la perspectiva y la rotación razonablemente esperada de una cámara de celular.

De manera similar, leer códigos QR y códigos de barras PDF-417 de un PDF escaneado requiere establecer un nivel apropiado de corrección de rotación de código de barras y corrección de imagen para limpiar ligeramente el documento. Sin embargo, se practica la precaución al no sobreespecificar y comprometer el rendimiento.

Si tiene una miniatura de código de barras corrupta, entonces los métodos de lectura de IronBarcode detectan automáticamente imágenes de códigos de barras que son demasiado pequeñas, y las amplían y limpian todo el ruido digital asociado con la miniaturización; haciéndolos legibles nuevamente.

¡Las cosas no podrían haber sido más fáciles para un desarrollador!

Aprender Más
Built For Dot Net related to Biblioteca .NET de Códigos

Construido para uso fácil en Proyectos .NET Core

Comience en minutos con unas pocas líneas de código. Construido para .NET Core, .NET Standard, y Framework como un único DLL fácil de usar; sin dependencias; soportando 32 & 64 bit; en cualquier Lenguaje .NET. Úselo en Aplicaciones Web, de Nube, de Escritorio o de Consola; soportando dispositivos Móviles y de Escritorio. Puede descargar el producto de software desde este enlace.

Construido para .NET, C#, Códigos QR

Comienza Ahora
Write Barcodes related to Biblioteca .NET de Códigos

Resumiendo IronBarcode - Para Crear y Manipular Imágenes de Códigos de Barras

Como IronBarcode facilita la creación, el redimensionamiento, y el guardado de varios tipos y formatos de códigos de barras, ¡no hay razón para no comenzar con ello de inmediato!

Con la API Fluida, use la clase de código de barras generada para establecer márgenes, redimensionar y anotar códigos de barras. Luego guárdelos como imágenes con IronOCR asumiendo automáticamente el tipo de imagen correcto de un nombre de archivo. Ya sea GIF, archivo HTML, etiqueta HTML, JPEG, PNG, TIFF y Bitmaps de Windows.

El método StampToExistingPdfPage permite generar un código de barras y estamparlo en una página PDF existente. Es útil al editar un PDF genérico o al agregar un número de identificación interno a un documento a través de un código de barras.

Conéctese con soporte humano EN VIVO 24/7 de inmediato. Ya sea que tenga una pregunta o requiera soporte de proyecto; comience con nuestra clave de prueba de 30 días, benefíciese de nuestro abundante recurso de documentación en inglés fácil de entender, o benefíciese de nuestra licencia de por vida a partir de $749.

Aprender Más
Soporta:
  • .NET Core 2.0 y superior
  • El marco .NET 4.0 y superior admite C#, VB, F#
  • Microsoft Visual Studio. Icono IDE de desarrollo .NET
  • Soporte de Instalador NuGet para Visual Studio
  • Compatible con asistente de lenguaje C# JetBrains ReSharper
  • Compatible con la plataforma de alojamiento Microsoft Azure C# .NET

Licenciamiento y Precios

Licencias de desarrollo comunitario gratuitas. Licencias comerciales desde $749.

Licencias de Biblioteca para Proyecto C# + VB.NET

Proyecto

Licencia de Biblioteca C# + VB.NET para Desarrolladores

Desarrollador

Licenciamiento de Biblioteca C# + VB.NET para Organizaciones

Organización

Licenciamiento de Biblioteca C# + VB.NET para Agencias

Agencia

Licenciamiento de Biblioteca C# + VB.NET para SaaS

SaaS

Licenciamiento de Biblioteca C# + VB.NET para OEM

OEM

Ver Opciones Completas de Licencia  

Tutoriales de Códigos de Barras & QR para C# & VB .NET

Tutorial + Ejemplos de Código Leyendo Códigos de Barras en C# | Tutorial .NET

C# .NET Código de barras QR

Frank Walker Desarrollador de Producto .NET

Leer Códigos de Barras y QRs | Tutorial C# VB .NET

Vea Cómo Frank usa IronBarcode para Leer Códigos de Barras desde Escaneos, Fotos, & documentos PDF dentro de su Aplicación de Código de Barras C# .NET...

Tutorial de Lectura de Códigos de Frank
Escribiendo Código de Barras Tutorial + Ejemplos de Código en C# & VB.NET

C# .NET Código de barras

Francesca Miller Ingeniera Júnior .NET

Generando Imágenes de Códigos de Barras en C# o VB.NET

Francesca comparte algunos consejos y trucos para escribir Códigos de Barras en Imágenes en Aplicaciones C# o VB. Vea cómo escribir los códigos de barras y todas las opciones disponibles para usted con IronBarcode...

Ver Tutorial de Códigos de Barras de Francesca
Tutorial + Ejemplos de Código Creación y Edición de PDF VB.NET | VB.NET y ASP.NET PDF

QR .NET C# VB

Jennifer Wright Líder de Arquitectura de Aplicaciones

Tutorial para Escribir Códigos QR en Aplicaciones C# & VB .NET

El equipo de Jenny usa IronBarcode para escribir miles de QRs por día. Vea su tutorial sobre cómo sacar el máximo provecho de IronBarcode...

Tutorial de Escritura de QR del Equipo de Jenny
Miles de desarrolladores usan IronBarcode para...

Sistemas de Contabilidad y Finanzas

  • # Recibos
  • # Informes
  • # Impresión de Facturas
Agregar Soporte de PDF a Sistemas de Contabilidad y Finanzas ASP.NET

Digitalización de Negocios

  • # Documentación
  • # Pedidos y Etiquetado
  • # Reemplazo de Papel
Casos de Uso de Digitalización de Negocios C#

Gestión de Contenidos Empresariales

  • # Producción de Contenidos
  • # Gestión de Documentos
  • # Distribución de Contenidos
Soporte de PDF CMS .NET

Aplicaciones de Datos e Informes

  • # Seguimiento del Rendimiento
  • # Mapeo de Tendencias
  • # Informes
Informes PDF en C#
Desarrolladores de Componentes .NET Empresariales de Iron Software

Miles de corporaciones, gobiernos, PYMEs y desarrolladores confían en los productos de Iron software.

El equipo de Iron tiene más de 10 años de experiencia en el mercado de componentes de software .NET.

Icono de Cliente Iron
Icono de Cliente Iron
Icono de Cliente Iron
Icono de Cliente Iron
Icono de Cliente Iron
Icono de Cliente Iron
Icono de Cliente Iron
Icono de Cliente Iron