# IronBarcode > The C# Barcode Library. Read and Write Barcodes in .NET Applications. Fast & Accurate using Scans and Live Image Processing. Supports .NET Framework. A single-file summary of the IronBarcode documentation: 89 pages, each as its own abstract, so a model can read the documentation in one pass rather than fetching every URL. Blog posts are not included — see https://ironsoftware.com/barcode/csharp/llms.txt for the link index, and https://ironsoftware.com/barcode/csharp/llms-full-catalog.txt for one that covers the blog too. ## Getting Started ### Advanced Installation NuGet | IronBarcode (.NET 10) https://ironsoftware.com/barcode/csharp/get-started/advanced-installation-nuget/ The article, "Advanced Installation NuGet | IronBarcode," provides a comprehensive guide on installing platform-specific versions of the IronBarCode library via NuGet, catering to various development environments. IronBarCode offers specialized packages to prevent unnecessary downloads and optimize performance across different platforms, including Windows, Linux, macOS, iOS, and Android. The main package, BarCode, includes essential components like BarCode.Slim and BarCode.Detection, with Windows-specific dependencies. BarCode.Slim is a lightweight package lacking machine learning features, suitable for environments with minimal noise. BarCode.Detection enhances barcode detection using machine learning and is compatible with all platforms. Platform-specific packages, like BarCode.Linux, BarCode.MacOs, BarCode.iOS, and BarCode.Android, contain tailored dependencies for their respective operating systems, ensuring better integration and performance on cloud services and mobile applications. Each package can be installed using the provided NuGet commands, and setup guides are available for each platform to facilitate easy integration. This detailed information assists developers in selecting the most appropriate IronBarCode package for their projects, enhancing functionality and efficiency within their specific development environments. ### C# Create and Scan Barcode on Android | IronBarcode https://ironsoftware.com/barcode/csharp/get-started/android/ The article on IronBarcode's website provides a comprehensive guide on implementing barcode scanning and generation in Android applications using the .NET MAUI framework. As the successor to Xamarin.Forms, .NET MAUI facilitates cross-platform app development. The guide introduces the BarCode.Android package, specifically designed to enhance barcode functionalities on Android devices within .NET projects. Users are instructed on setting up a .NET MAUI project through Visual Studio, incorporating the BarCode.Android library via NuGet, and configuring project files to ensure seamless integration. Key steps include modifying the project file (.csproj) to conditionally include the barcode package only for Android and configuring Android bundle settings through a "BundleConfig.json" file. The article also details designing the app interface using XAML, allowing users to input data for barcode and QR code generation and reading. The C# code example demonstrates handling input, generating barcodes/QR codes, saving them in desired formats (PDF or PNG), and reading barcodes from selected files. Finally, it encourages downloading the complete project for a hands-on experience, ensuring developers can effectively integrate barcode features into their Android applications using the .NET MAUI framework. ### ASP.NET Core Barcode Scanner in C#: Razor Pages Tutorial | IronBarcode https://ironsoftware.com/barcode/csharp/get-started/aspnet-core-barcode-scanner-tutorial/ The tutorial on IronBarcode’s website provides a comprehensive guide for implementing a server-side barcode scanner in ASP.NET Core Razor Pages using C#. The article emphasizes the simplicity and efficiency of using IronBarcode for reading various barcode formats like QR Codes, Code 128, and Code 39. It instructs developers on how to integrate barcode scanning functionality into their applications, leveraging the capabilities of the BarcodeReader.Read method. The tutorial also covers the process of uploading images using the IFormFile interface, enabling seamless barcode reading from image files. Furthermore, it explains how to generate barcodes server-side with the BarcodeWriter.CreateBarcode method, highlighting the versatility of IronBarcode in handling both reading and writing operations. The guide is designed for developers who wish to enhance their ASP.NET Core applications with robust barcode scanning and generation features. By following the step-by-step instructions, developers can quickly set up and deploy a barcode scanning solution, making it an invaluable resource for those aiming to streamline their web applications with advanced barcode processing capabilities. The tutorial is ideal for those familiar with C# and ASP.NET Core, seeking to expand their technical arsenal with practical barcode functionalities. ### Setup on AWS Lambda | IronBarcode https://ironsoftware.com/barcode/csharp/get-started/aws/ The article "Setup on AWS Lambda | IronBarcode" provides a detailed guide on integrating IronBarcode into a C# project on AWS Lambda. It outlines the process of configuring IronBarcode to read and write barcodes stored in an S3 bucket. The tutorial begins with downloading the necessary C# library and setting up an AWS Lambda project using Visual Studio with the AWS Toolkit. Key steps include modifying the FunctionHandler code to generate and process barcodes, configuring deployment settings, and managing dependencies via Dockerfile updates. A critical aspect of the setup involves adjusting the AWS Lambda environment to handle barcode operations efficiently, such as setting memory allocation to 512 MB and timeout to 300 seconds to avoid runtime errors. The article also highlights the importance of setting the IronBarcode ZIP temporary folder for proper functioning. Additionally, readers learn how to publish the Lambda function and test its operations using either the Lambda console or Visual Studio. The guide also addresses potential troubleshooting scenarios and offers customization tips using BarcodeReaderOptions for enhanced barcode processing capabilities. ### Can I Run IronBarcode with .NET on Azure https://ironsoftware.com/barcode/csharp/get-started/azure/ IronBarcode can seamlessly run with .NET applications on Azure, enabling the reading and writing of QR and barcodes across various Azure platforms, such as MVC websites and Azure Functions. To begin, developers should install the IronBarcode NuGet package or download the IronBarcode.dll directly to integrate it into their projects. For optimal performance, it is recommended to use at least the Azure B1 service plan, with higher tiers available for systems requiring greater throughput. IronBarcode supports .NET Standard, Core, and Framework projects, which provides flexibility in framework selection. Additionally, developers can leverage Docker on Azure to control performance and stability effectively. For specific integration, IronBarcode offers support for Azure Functions V3 and V4, demonstrated through a provided code example. In this example, an Azure Function named "barcode" is set up to generate a QR code from a string when triggered by an HTTP request. The function sets the IronBarcode license key, creates a QR code, and returns the barcode image as a downloadable JPEG file. This functionality is compatible with Azure Functions v3.3.1.0 and newer, showcasing IronBarcode's versatility and ease of deployment in Azure environments. ### Using IronBarcode in Blazor Projects https://ironsoftware.com/barcode/csharp/get-started/blazor/ The article titled "Using IronBarcode in Blazor Projects" provides a comprehensive guide for integrating the IronBarcode library within a Blazor application. This implementation enables the scanning of barcodes or QR codes using a user's webcam. The step-by-step approach begins with installing the necessary C# library for barcode scanning in Blazor. Users are instructed to create a Blazor server project, add a Razor component, and enable webcam access through JavaScript to capture images. The article details how to utilize the `BarcodeReader.Read` method to decode barcodes from captured images. The process involves setting up the Blazor project in Visual Studio, selecting the .NET framework, and adding webcam support via a JavaScript file named `webcam.js`. This file handles camera access and streams video input to a designated video element. Capturing images is achieved by drawing frames onto a canvas and sending them as base64 encoded images to a C# method for processing. The article further explains how to add the IronBarcode NuGet package to the project and create an API method that processes the encoded images to extract barcode values. The resulting barcode data is accessed through the `Value` property of the `BarcodeResult` object. ### .NET 10: Run IronBarcode in Docker on Linux Guide https://ironsoftware.com/barcode/csharp/get-started/docker-linux/ The article "Run IronBarcode in Docker on Linux: Step-by-Step Guide" provides a comprehensive guide for setting up and running IronBarcode applications within Docker containers on Linux systems. IronBarcode is compatible with Docker environments, including those on Azure and AWS for both Linux and Windows platforms. Docker is highlighted for its ability to package applications into lightweight, portable containers that can be deployed across various environments. For developers new to Docker with .NET, resources for setting up Docker debugging and integration with Visual Studio are recommended. The guide also emphasizes using Microsoft's official Docker images for ease of configuration. It outlines the recommended Linux distributions for hosting IronBarcode, including Ubuntu (24.04 and 22.04), Debian 12, and RHEL/UBI (8 or 9) — Microsoft no longer publishes official CentOS runtime images. Detailed Dockerfiles for each of these distributions are provided, showcasing configurations on .NET 8 LTS. The guide encourages using the IronBarCode NuGet Package for seamless development across Windows, macOS, and Linux environments. This step-by-step approach ensures developers can efficiently deploy and run their barcode applications in a containerized setup. ### C# Create and Scan Barcode on iOS | IronBarcode https://ironsoftware.com/barcode/csharp/get-started/ios/ The article titled "C# Create and Scan Barcode on iOS | IronBarcode" provides a detailed guide on how to read and write barcodes on iOS using .NET MAUI (Multi-platform App UI). This framework extends Xamarin.Forms, allowing developers to create native interfaces across Android, iOS, macOS, and Windows. The core of the guide is the BarCode.iOS package, which integrates barcode functionalities into iOS applications built with .NET MAUI. The article outlines a step-by-step process beginning with the installation of the BarCode.iOS library via NuGet, followed by creating a .NET MAUI project. Developers are instructed on how to modify the XAML file to include UI elements for barcode input and output, and subsequently, how to handle barcode recognition in the C# backend. The guide emphasizes tailoring the csproj file to ensure the package is used exclusively for iOS platforms, preventing conflicts with others like Android. Additionally, it covers generating barcodes and QR codes, setting up the license key, and saving files. The article concludes by demonstrating how to run the project on an iOS simulator and provides a downloadable sample project for reference. ### IronBarcode .NET 10 License Key Management for C# | IronBarcode https://ironsoftware.com/barcode/csharp/get-started/license-keys/ The article titled "IronBarcode License Key Management for C#" from Iron Software provides a comprehensive guide on implementing and managing license keys for IronBarcode in C# applications, ensuring proper usage and compliance. It begins by instructing users on acquiring a license key, either through purchase or a free 30-day trial. The article then details the installation process via NuGet or DLL for the latest version of IronBarcode. The application of the license key is outlined in three methods: through code at application startup, using Web.Config or App.Config, and via a .NET Core appsettings.json file. Users are informed about a known licensing issue affecting certain versions and frameworks, with a link provided for troubleshooting. Testing of the license key's validity and successful licensing of IronBarcode is also explained. Finally, the article encourages users to start their projects with IronBarcode and offers support contact information for further inquiries. This guide is essential for developers seeking to deploy their projects without restrictions, ensuring a smooth integration of IronBarcode into their applications. ### Linux Barcode Integration with IronBarcode for .NET 10 https://ironsoftware.com/barcode/csharp/get-started/linux/ The article "Linux Barcode Integration with IronBarcode" provides a comprehensive guide on setting up and running IronBarcode on Linux systems. IronBarcode is compatible with .NET Standard, .NET Core, and .NET Framework applications across various Linux distributions, including Ubuntu, Debian, and CentOS. The software operates seamlessly without requiring code modifications, reflecting extensive testing by Iron Software's engineers. This compatibility is crucial as many cloud services are Linux-based, aligning with the needs of enterprise and SaaS customers. The guide details supported distributions, recommending Ubuntu (versions 18 and 20), Debian (versions 10 and 11), and CentOS 7 for zero-configuration setups. Ubuntu, being heavily tested and supported by Microsoft .NET and Docker, is highlighted for its ease of use in Azure infrastructure. For each supported Linux version, the article provides step-by-step setup instructions, emphasizing the installation of necessary libraries like libgdiplus and, for CentOS, packages such as Mono. The guide underscores the importance of having sudo privileges for the installation process and includes Docker commands to facilitate the setup. This resource aims to simplify the integration of barcode operations in a Linux environment, enhancing functionality for developers and businesses. ### Using IronBarcode on macOS: A Developer’s Guide for .NET 10 https://ironsoftware.com/barcode/csharp/get-started/macos/ The article titled "Using IronBarcode on macOS: A Developer’s Guide" provides a comprehensive guide for implementing IronBarcode in macOS applications using C#. It highlights IronBarcode's full support for macOS on both .NET Standard and Core, accommodating both Intel and Apple silicon architectures seamlessly without requiring any code changes. The guide emphasizes the importance of macOS support, noting that many .NET developers, including the IronBarcode team, prefer developing applications on macOS platforms using tools like JetBrains Rider and Visual Studio Code. The article also details the configuration and installation process for IronBarcode on macOS, directing users to the IronBarcode NuGet installation guide for further information on deploying to Mac. This resource is essential for developers aiming to create, read, and manage barcodes efficiently within macOS environments using C#. The guide underscores the ease of transition for developers working on macOS, ensuring that tools and packages are readily accessible and straightforward to implement, thus enhancing the development experience for .NET applications on macOS. ### Using IronBarcode With C#, VB.NET & F# | .NET Language Support https://ironsoftware.com/barcode/csharp/get-started/net-language-support/ The article titled "Using IronBarcode With C#, VB.NET & F#" provides an overview of how the IronBarcode library, built on .NET Standard 2.0, seamlessly integrates with C#, VB.NET, and F# without requiring additional configuration. The API is consistent across these languages, allowing developers to utilize the same methods, classes, and properties. Installation is straightforward via NuGet, using the `BarCode` package, which is universally compatible with all three languages. The article includes code examples for generating and reading barcodes in each language. In C#, developers can create QR codes and save them as images using straightforward syntax. VB.NET developers follow similar steps with slight syntax variations, and F# developers can leverage the library in F# Interactive or standard projects. The article highlights IronBarcode's compatibility with various .NET versions, including .NET 9 through 5, .NET Core 3.x and 2.x, and .NET Framework 4.6.2+, ensuring broad support across different development environments. For further installation details specific to platforms like Windows, Linux, and macOS, the article directs readers to an advanced installation guide. ### .NET MAUI Barcode Scanner & Reader (Step-By-Step Tutorial) | IronBarcode https://ironsoftware.com/barcode/csharp/get-started/net-maui-barcode-scanner-reader-tutorial/ The article titled ".NET MAUI Barcode Scanner & Reader (Step-By-Step Tutorial) | IronBarcode" provides a comprehensive guide on integrating the IronBarcode library in a .NET MAUI application to scan barcodes and QR codes. .NET MAUI (Multi-platform App UI) is a framework that allows developers to create cross-platform applications using a single codebase, facilitating the development of Windows, iOS, and Android apps. The tutorial outlines the steps to install the IronBarcode library via the NuGet Package Manager in Visual Studio 2022, design the application's front-end using XAML, and implement the barcode scanning functionality using C#. The process involves selecting an image file through a FilePicker, reading the barcode using IronBarcode's API, and displaying the result in a text editor. Additionally, the article explains how to enable users to copy the scanned text to the clipboard. The tutorial concludes by highlighting IronBarcode's efficiency in reading various barcode formats and its necessity for licensing. The source code for the project is available on GitHub, and the article encourages further exploration of IronBarcode's capabilities through additional tutorials and licensing information. ### Supported Barcode Formats https://ironsoftware.com/barcode/csharp/get-started/supported-barcode-formats/ The article "Supported Barcode Formats" from IronBarcode provides an extensive overview of various barcode formats supported by their software. It categorizes barcodes into two main types: two-dimensional (2D) and linear. 2D barcodes, such as QR Code, Data Matrix, Aztec, MaxiCode, and Intelligent Mail, are highlighted for their ability to encode more data in less space, which makes them ideal for industries like logistics, healthcare, and marketing. Each 2D format has unique properties catering to different needs, like compact labeling and high-speed scanning. The article also details modern linear barcodes, including Code 39, Code 128, GS1-128, PDF417, and Databar formats, which are used for data exchange and logistics. Additionally, older linear formats like UPC-A, UPC-E, EAN-8, EAN-13, CodaBar, ITF, MSI, and Plessey are discussed, showcasing their continued relevance in various applications. The article serves as a guide for users to select the most appropriate barcode format for generating or decoding purposes, ensuring compatibility and addressing format-related challenges effectively. ## Tutorials ### How to Generate Barcode Images in C# .NET 10 Applications | IronBarcode https://ironsoftware.com/barcode/csharp/tutorials/csharp-barcode-image-generator/ The article titled "(Step by Step) Generate Barcode Image in C# .NET | IronBarcode" provides a comprehensive tutorial on generating barcode images using the IronBarcode library in C#. It guides readers through installing the library via NuGet or DLL download, enabling barcode functionality within the .NET framework. The tutorial illustrates creating simple barcodes by specifying values and formats, exporting them as images or Bitmap objects. It further explores advanced customization options, such as adding annotations, changing fonts and colors, and saving outputs in various formats like HTML or PDF. A notable feature of IronBarcode is its optional Fluent API, allowing users to create, style, and export barcodes in a single line of code, enhancing readability. The article also provides links to source code downloads, including a GitHub repository and a Visual Studio project, for practical implementation. Additionally, it references further documentation and tutorials on related topics, like reading barcode images and generating QR codes, offering a resource-rich guide for developers looking to integrate barcode generation into their C# applications. ### C# QR Code Generator (for .NET 10, 9, 8, 7, 6, Core & Framework) https://ironsoftware.com/barcode/csharp/tutorials/csharp-qr-code-generator/ The tutorial on Iron Software's website provides a comprehensive guide to generating and customizing QR codes using the IronBarcode library for .NET environments, including .NET 10, 9, 8, 7, 6, Core, and Framework. The IronQR library leverages advanced machine learning techniques to read QR codes with 99.99% accuracy from any angle, offering an efficient solution for producing and customizing new QR codes. The tutorial outlines the steps to download the QR code generator library via the BarCode NuGet Package and demonstrates how to create a QR code with a single line of code. Users can enhance their QR codes by incorporating logos, verifying readability, and saving them as images, PDFs, or HTML files. The guide also explores encoding and decoding binary data within QR codes, showcasing IronBarcode's unique features for handling binary data. Additionally, it provides insights into reading QR codes with IronBarcode and encourages further exploration through downloadable source code and additional documentation, such as the QRCodeWriter and BarcodeReader classes. The tutorial offers practical examples to equip developers with the skills to integrate QR code functionalities into their applications effectively. ### C# Barcode Reader Tutorial - Scan QR & Barcodes in .NET https://ironsoftware.com/barcode/csharp/tutorials/reading-barcodes/ The article "C# Barcode Reader & Scanner" is a comprehensive tutorial on using the IronBarcode library for reading barcodes and QR codes in .NET projects. IronBarcode is a versatile and efficient C# and VB.NET library that enables developers to read and write various barcode formats. The guide begins by instructing users on installing IronBarcode via NuGet or DLL download. It provides a step-by-step process for using the `BarcodeReader.Read` method to scan multiple barcodes in a single operation, including imperfect scans from photos. The tutorial demonstrates reading barcodes from PDFs and multi-frame TIFF files, emphasizing the library's ability to handle challenging images using the ExtremeDetail value of the Speed enum. The article also highlights the benefits of multi-threading for faster barcode processing across multiple documents. IronBarcode supports reading a wide range of barcode formats, making it suitable for various applications. The guide encourages further exploration of IronBarcode's capabilities through additional tutorials and API references. It concludes by inviting users to download the tutorial source code from GitHub for hands-on experience, providing resources for a Visual Studio 2017 Console Application project written in C#. ## How-To Guides ### Async & Multithreaded Barcode Reading in C# | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/async-multithread/ IronBarcode enables developers to optimize barcode reading performance in C# through both asynchronous operations and multithreading capabilities. Async functionality prevents blocking the main thread during I/O operations using the `async` and `await` keywords, making it ideal for handling multiple image files or large PDFs. This is implemented through the `ReadAsync` and `ReadPdfsAsync` methods. Multithreading, on the other hand, processes multiple barcodes simultaneously across CPU cores by setting the `Multithreaded` property to true and configuring parallel threads with `MaxParallelThreads`. The library allows developers to combine both approaches for maximum efficiency, as demonstrated in the quickstart example that reads multiple barcode images in parallel with minimal setup. The asynchronous approach is particularly beneficial during the file reading phase of barcode processing, which involves reading the file, applying reading options, and decoding the barcode. By releasing the main thread during I/O-bound operations, developers can handle other tasks while barcode reading proceeds in the background, significantly improving application responsiveness and resource utilization. ### How to Create A Desktop Barcode Application | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/barcode-desktop-maui/ The article provides a comprehensive guide on creating a desktop barcode application using C# and IronBarcode within the .NET MAUI framework. It is designed for developers seeking to build efficient and functional barcode generators and scanners tailored for desktop environments. The guide outlines step-by-step instructions from setting up the development environment to implementing the core functionalities of barcode generation and scanning. Key highlights include leveraging the versatility of IronBarcode to handle various barcode formats, ensuring compatibility across different operating systems, and enhancing user experience through intuitive interface design. The article also delves into best practices for optimizing performance and reliability of the application, alongside offering troubleshooting tips for common issues that developers might encounter. This resource is essential for those aiming to integrate barcode technology into desktop applications, providing valuable insights and practical examples to streamline the development process. By following the detailed instructions and utilizing the robust capabilities of IronBarcode, developers can create powerful and user-friendly barcode applications that meet modern business requirements. Overall, the article serves as an essential toolkit for both novice and experienced developers in the barcode application development sphere. ### Barcode Checksum & Format Validation in C# | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/checksum-and-format-validation/ The article titled "Barcode Checksum & Format Validation in C#" from IronBarcode provides a comprehensive guide on validating barcode checksums and applying format constraints during barcode reading in C#. It highlights the importance of checksum validation in ensuring data integrity and accuracy when working with barcodes. The article details the process of implicit checksum handling, which simplifies the validation by automatically verifying the checksum during barcode reading. Additionally, it explores the use of BarcodeEncoding filters, allowing developers to constrain barcode reads to specific formats, enhancing the efficiency and precision of barcode scanning processes. The guide further elaborates on the capabilities of IronBarcode, a robust library designed to streamline barcode operations in C#. It also covers the combined validation approach, which integrates checksum verification and format-aware reading to deliver reliable and accurate barcode scanning results. Through code examples and practical insights, the article serves as a valuable resource for developers looking to implement efficient barcode validation and reading techniques within their C# applications using IronBarcode. Overall, it underscores the significance of employing both checksum validation and format constraints to achieve optimal performance and accuracy in barcode operations. ### Create 1D Linear Barcodes in C# | IronBarcode Guide https://ironsoftware.com/barcode/csharp/how-to/create-1d-barcodes/ IronBarcode is a C# library that enables developers to generate all major 1D barcode formats including Code 128, GS1-128, Code 39, Code 93, EAN-13, EAN-8, UPC-A, UPC-E, Intelligent Mail, MSI, Codabar, and DataBar. The library features automatic validation and compliance checking, making it ideal for creating linear barcodes used in retail, shipping, and postal services. Linear barcodes remain industry standard due to their speed, reliability, and compatibility with virtually any scanner, excelling in high-speed environments like checkout lines and conveyor belts. The main implementation involves using the BarcodeWriter.CreateBarcode() method with a data string and specifying the barcode type through the BarcodeEncoding enum. Generated barcodes can be saved in various formats including JPEG, PNG, and PDF, with options for custom sizing and styling. IronBarcode simplifies the challenge of selecting appropriate barcode formats for specific use cases, whether it's Code 128 for shipping labels requiring high data density, EAN-8 for small products, or Intelligent Mail Barcode for postal services with strict formatting requirements. ### Create 2D Barcodes in C# - QR, Aztec, DataMatrix Guide https://ironsoftware.com/barcode/csharp/how-to/create-2d-barcodes/ IronBarcode is a comprehensive C# library that enables developers to generate over 30 barcode formats, including all major 2D barcodes such as QR Code, Aztec, DataMatrix, MaxiCode, PDF417, and the new rMQR format. The library offers a simple API where developers can create barcodes with just a few lines of code by passing the desired encoding type to the CreateBarcode method and exporting as an image. 2D barcodes are ideal for storing detailed information in compact spaces, holding thousands of characters while maintaining readability even when damaged. They can be scanned from any angle without requiring perfect alignment, making them perfect for fast-paced logistics and mobile applications. Built-in error correction ensures data accessibility in challenging conditions. Different formats serve specific purposes: Aztec Code's borderless design suits mobile ticketing, Data Matrix works well for tiny electronic components, and PDF417's massive storage capacity is ideal for driver's licenses. The guide demonstrates how to quickly generate a QR code using IronBarcode with simple installation via NuGet and minimal code implementation, making it an efficient solution for all barcode generation needs. ### Stamp Barcodes on PDFs in C# - IronBarcode Tutorial https://ironsoftware.com/barcode/csharp/how-to/create-and-stamp-barcode-pdf/ IronBarcode enables C# developers to stamp barcodes and QR codes onto existing PDF documents using the CreateBarcode method combined with StampToExistingPdfPage for single pages or StampToExistingPdfPages for multiple pages. The library allows precise positioning of barcodes by specifying X and Y coordinates in pixels, with X measured from the left edge and Y from the bottom edge. Page numbers are 1-indexed, meaning the first page is numbered 1. This functionality is particularly useful for adding tracking codes, inventory labels, document identifiers, batch numbers, or QR codes for digital authentication to existing PDFs like reports, invoices, and forms. The stamping process is direct and efficient, eliminating the need for intermediate file saving or temporary files. IronBarcode supports password-protected PDFs and provides a straightforward API that maintains simplicity while offering flexibility. Common use cases include adding unique tracking codes to shipping labels, batch numbers on manufacturing reports, document control numbers on legal forms, and QR codes for quick access links. The library streamlines the workflow into five simple steps: downloading the library, creating a barcode with specified type and value, setting the size, and using the appropriate stamping method. ### Export C# Barcodes as HTML | Data URL & Tags | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/create-barcode-as-html/ IronBarcode is a C# library that enables developers to export generated barcodes as HTML in three versatile formats: Data URLs for inline embedding, HTML tags for direct injection, and complete HTML files for standalone use. The library provides a simple one-line solution to create barcodes without managing external image files or dependencies. Developers can instantly generate barcodes using the CreateBarcode() method and export them with methods like ToDataUrl(), ToHtmlTag(), or as complete HTML files. Data URLs offer significant advantages for web applications by embedding barcode data directly into HTML documents, eliminating separate HTTP requests and improving page load performance. This approach is particularly beneficial for single-page applications, email templates, offline-capable applications, and dynamic barcode generation scenarios. The library supports all standard barcode formats and is ideal for situations where barcodes are small (under 32KB) and require immediate inline rendering. IronBarcode simplifies the integration process, making it easy to deploy barcode functionality in cloud environments like Azure and AWS while maintaining efficiency and reducing server dependencies. ### Export C# Barcodes to PDF: File, Binary & Stream Methods https://ironsoftware.com/barcode/csharp/how-to/create-barcode-as-pdf/ IronBarcode provides C# developers with three efficient methods to export barcodes to PDF format: direct file saving, binary data conversion, and memory streaming. The library enables one-line operations for quick PDF generation, making it ideal for inventory management, shipping labels, and document workflows. The simplest approach involves creating a GeneratedBarcode object using BarcodeWriter.CreateBarcode, then utilizing the SaveAsPdf() method to save directly to disk. This method supports flexible file path options including absolute paths, relative paths, and environment variables. The direct file saving approach is particularly valuable when generating physical documents, printable labels, or archiving barcodes for long-term storage, as PDF format ensures consistent rendering across different platforms and printers. IronBarcode streamlines the barcode-to-PDF conversion process, allowing developers to implement barcode generation with minimal code while maintaining professional-quality output suitable for enterprise applications. The library's versatility makes it an essential tool for .NET developers working with barcode generation and document management systems. ### Create Barcode from Data in C# | IronBarcode Tutorial https://ironsoftware.com/barcode/csharp/how-to/create-barcode-from-data/ IronBarcode is a C# library that enables developers to generate barcodes from various data sources including strings, byte arrays, and memory streams. The library supports multiple barcode formats such as QR Code, Code128, PDF417, Code93, and Aztec through its `BarcodeWriter.CreateBarcode()` method. Creating a barcode requires just one line of code, making it extremely simple to implement. Different barcode formats are optimized for specific use cases: QR Codes excel at encoding URLs and large text (up to 4,296 characters), Code128 is ideal for alphanumeric order numbers, PDF417 handles complex data like flight tickets (up to 1,850 characters), Code93 works well for postal services and inventory, while Aztec is optimal for mobile ticketing. The library allows developers to save generated barcodes in multiple image formats including PNG. IronBarcode streamlines the barcode generation process with minimal setup required, making it accessible for developers to quickly integrate barcode functionality into their C# applications for various business needs ranging from inventory management to ticketing systems. ### Create Barcode Images in C# - IronBarcode Tutorial https://ironsoftware.com/barcode/csharp/how-to/create-barcode-images/ IronBarcode is a C# library that enables .NET developers to generate barcode and QR code images with a single line of code. The library supports over 30 barcode formats including Code128, QR codes, UPC, EAN, Data Matrix, PDF417, and more. Developers can create barcodes by calling the CreateBarcode() method from the BarcodeWriter class, specifying the barcode value, encoding type, width, and height. The method accepts various data types including strings, byte arrays, and MemoryStreams for barcode values. Generated barcodes can be saved in multiple image formats such as PNG and JPG. The library handles both 1D linear barcodes and 2D formats, with each format serving specific use cases - Code128 for general alphanumeric data, QR codes for mobile scanning with error correction, and specialized formats like MaxiCode for shipping. Width and height settings control the output image dimensions in pixels, with default measurements of 250px. IronBarcode is ideal for building inventory management systems, retail applications, and document processing solutions that require professional-quality, reliably scannable barcodes. ### Style & Customize C# Barcodes - IronBarcode Tutorial https://ironsoftware.com/barcode/csharp/how-to/customize-barcode-style/ IronBarcode is a C# library that enables developers to customize and style barcodes in .NET applications through simple method calls. The library supports various barcode formats including PDF417, Aztec, IntelligentMail, MaxiCode, and DataMatrix, each with unique appearances. Developers can easily modify barcode colors, resize dimensions, and add annotations using methods like ChangeBarCodeColor() and ResizeTo(). The library leverages IronDrawing, an open-source companion library, to provide styling capabilities that include customizing barcode colors, backgrounds, and dimensions. The ResizeTo() method allows lossless re-rendering of barcodes at new dimensions specified in pixels, maintaining quality while adjusting size to fit specific layouts or print requirements. IronBarcode's comprehensive generation features make it simple to create styled barcodes with just a few chained method calls, as demonstrated in the quick-start example that shows how to generate a blue barcode with a white background and save it as an image. This flexibility makes IronBarcode suitable for applications where barcodes need to be visually integrated into products or documents with specific styling requirements. ### C# QR Code Customization: Add Logos & Colors | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/customize-qr-code-style/ IronBarcode enables C# developers to create customized QR codes with advanced branding features including logo integration, color customization, and text annotations. The library's CreateQrCodeWithLogo method allows embedding logos directly into QR codes while maintaining scannability. Developers can modify color schemes using ChangeBarCodeColor and add professional annotations with AddAnnotationTextAboveBarcode methods. The entire customization process can be achieved in a single line of code, making it ideal for rapid implementation in marketing and business applications. IronBarcode leverages IronDrawing, an open-source library, to power these styling capabilities. The platform supports multiple barcode formats including standard QR codes, Micro QR, and the latest rMQR formats. Key features include logo integration with rounded edges, custom color applications, text annotations above or below the barcode, and value display options. The minimal workflow involves just five steps: downloading the library, creating a QR code with logo, applying custom colors, adding annotations, and displaying the barcode value. This comprehensive solution addresses the growing demand for branded QR codes in modern marketing campaigns, offering businesses an efficient way to create professional, scannable QR codes that align with their brand identity while maintaining functionality. ### Barcode Error Handling & Debugging in C# | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/detailed-error-messages/ The article titled "Barcode Error Handling & Debugging in C# | IronBarcode" provides an in-depth guide on managing errors and debugging barcode operations in C#. It begins by highlighting the importance of robust error handling to ensure smooth barcode processing in various applications. The article elaborates on the use of typed exceptions, which offer precise and descriptive error information, enabling developers to quickly identify and address issues. Additionally, it discusses the advantages of built-in logging to track barcode operations, allowing for efficient error tracking and analysis over time. Diagnostic extraction is also covered, providing insights into the operational environment and barcode data, which can be critical in understanding and resolving complex errors. For production environments, the article recommends batch error isolation, a technique that allows developers to isolate and address errors without disrupting the entire operation. By implementing these strategies, the article emphasizes that developers can enhance the reliability and performance of barcode solutions built with IronBarcode in C#. This comprehensive guide serves as a valuable resource for developers seeking to optimize their error handling and debugging processes in barcode applications. ### C# QR Code Error Correction Levels | IronBarcode Guide https://ironsoftware.com/barcode/csharp/how-to/error-correction/ Error correction in C# barcodes is implemented using IronBarcode's QRCodeWriter.CreateQrCode method, which supports four standardized error correction levels (L, M, Q, H) capable of recovering 7-30% of damaged data. This feature ensures barcode readability despite visual defects from printing imperfections, smudges, or scanning variations. 2D barcodes like QR codes offer superior error tolerance compared to 1D barcodes due to higher data capacity, redundancy through multiple encoding layers, compact design, and flexible scanning angles. IronBarcode specifically supports error correction settings for QR Codes, Micro QRs, and rMQRs. Developers can easily implement error correction by using the QrErrorCorrectionLevel parameter when generating QR codes. Higher correction levels create more complex QR codes but provide better damage resistance. The library includes a simple workflow: download IronBarcode, use QRCodeWriter class, adjust the QrErrorCorrection parameter, and compare outputs at different correction levels. This functionality is particularly valuable when dealing with imperfect barcodes or challenging scanning conditions where maintaining readability is crucial for reliable data capture. ### Export Barcode as Stream in C# - IronBarcode Tutorial https://ironsoftware.com/barcode/csharp/how-to/export-barcode-as-stream/ IronBarcode enables C# developers to generate barcodes and export them directly as MemoryStream objects, eliminating file I/O operations for enhanced performance and security. This tutorial demonstrates how to create barcodes and convert them to streams with a single line of code using the ToStream method, which defaults to PNG format. The stream-based approach is ideal for web APIs, cloud services, and batch processing applications where temporary file creation is undesirable or restricted. Key advantages include enhanced security (no temporary files exposing sensitive data), better performance through direct memory operations, seamless cloud compatibility for containerized environments, and improved resource efficiency. Common use cases include returning barcodes in HTTP responses, storing barcode data as binary blobs in databases, and integrating with email services. The tutorial covers the minimal 5-step workflow: downloading the IronBarcode library, creating barcodes from input values, converting to streams, exporting different image formats, and applying further processing. This functionality works with both standard barcodes and QR codes, even after applying custom styling, making it a versatile solution for modern applications requiring efficient barcode generation without file system dependencies. ### C# Image Correction Filters for Barcode Reading Guide https://ironsoftware.com/barcode/csharp/how-to/image-correction/ IronBarcode is a C# library that provides built-in image correction filters to enhance blurry or imperfect barcode images, improving reading accuracy without requiring external image editing software. Poor image quality is a primary factor preventing successful barcode reads, and IronBarcode addresses this by offering programmatic filters like SharpenFilter and ContrastFilter. These filters can be easily applied through the ImageFilterCollection in BarcodeReaderOptions with minimal setup. The process involves downloading the C# library, exploring available filters, configuring custom filter values, and applying them to imperfect images to retrieve barcode values. The implementation requires just a few lines of code, where users instantiate an ImageFilterCollection, create filter instances with specific parameters, and pass them to the BarcodeReaderOptions object. This approach eliminates the need for recapturing images or using external enhancement tools, making barcode reading more efficient and reliable in .NET applications. The article demonstrates how to apply these filters to blurry sample images where brightness is acceptable but sharpness needs improvement, showing practical implementation through code examples. ### Fix C# Barcode Orientation: AutoRotate Guide | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/image-orientation-correction/ IronBarcode offers a powerful AutoRotate feature that automatically corrects barcode orientation in C# applications, eliminating the need for manual image rotation. This built-in capability detects and reads barcodes at any angle, whether they're tilted at 20°, 45°, or any other orientation. The feature is enabled by default and requires just one line of code to implement. By setting the AutoRotate property to true in BarcodeReaderOptions, developers can ensure accurate barcode reading from rotated images. The technology uses advanced machine learning algorithms to automatically detect barcode orientation, making it particularly useful when working with various barcode formats including QR codes, Data Matrix, and traditional linear barcodes. This solution is effective whether reading barcodes from images or scanning from PDF documents. The implementation is straightforward, requiring only five steps: downloading the C# library, enabling AutoRotate (already true by default), importing the target barcodes, reading with the specified options, and retrieving the barcode values. This automatic orientation correction significantly improves barcode reading reliability and accuracy, especially when dealing with non-horizontally aligned barcodes that would otherwise pose challenges for standard barcode reading libraries. ### Setting Max Parallel Threads | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/max-parallel-thread/ The article titled "Setting Max Parallel Threads | IronBarcode" is a comprehensive guide on optimizing barcode generation performance in C# using IronBarcode by setting the maximum number of parallel threads. It addresses the need for efficient barcode creation, particularly when dealing with bulk operations. The guide provides a step-by-step approach to configure parallel threads, enhancing processing speed and resource management. It explains the concept of parallel threading and how it can be leveraged to improve the performance of barcode generation tasks. The article further discusses the benefits of parallel processing, such as reduced time and increased efficiency, especially in large-scale applications. It includes practical code examples to demonstrate the implementation process, ensuring that readers can easily follow along and apply the instructions in their own projects. Additionally, it offers insights into best practices for setting thread limits based on hardware capabilities and workload requirements, helping developers make informed decisions. The guide is an essential resource for developers looking to optimize their applications by effectively managing system resources during barcode generation tasks. ### Create C# MSI Installer with IronBarCode | Tutorial https://ironsoftware.com/barcode/csharp/how-to/msi-installer/ This tutorial explains how to create a C# MSI installer package incorporating IronBarCode functionality. MSI (Microsoft Installer) packages provide a standardized Windows installation format with enterprise-friendly features like rollback capabilities and Windows Installer service integration. The process involves adding a Setup Project to your Visual Studio solution and including three essential DLLs: onnxruntime.dll, IronBarcodeInterop.dll, and ReaderInterop.dll. Prerequisites include downloading the Microsoft Visual Studio Installer Projects extension and installing IronBarCode via NuGet. The tutorial demonstrates building a distributable MSI package from a barcode application that leverages IronBarCode's scanning capabilities. IronBarCode supports multiple barcode formats and offers a simple API for both creating and reading barcodes. The guide includes a quickstart example showing how to generate and read MSI barcodes with just a few lines of code. The minimal workflow consists of five steps: downloading the C# library, adding a button from the toolbox, editing button code for barcode reading, configuring the Setup Project, and optionally downloading a sample project for quick implementation. ### Barcode Null Checking in C# | IronBarcode Guide https://ironsoftware.com/barcode/csharp/how-to/null-checking/ The article titled "Barcode Null Checking in C# | IronBarcode Guide" provides a comprehensive guide on implementing null-safe patterns for barcode operations in C#. It emphasizes the importance of handling null values effectively to ensure robust barcode processing. The guide highlights how IronBarcode, a leading barcode library, facilitates null checking through various techniques. Key strategies include guarding `BarcodeResults` to prevent null-related exceptions, validating write inputs to ensure data integrity, and filtering by confidence levels to improve the accuracy of barcode results. The article explains these methods in detail, offering code snippets and examples to demonstrate best practices for implementing null checks in C#. By following the outlined procedures, developers can safeguard their applications against errors that may arise from null values, enhancing the reliability and performance of their barcode operations. The guide is particularly useful for developers seeking to optimize their barcode handling processes in C# using IronBarcode's robust functionalities. Overall, the article serves as a valuable resource for improving null safety in barcode operations, ensuring accurate data processing and efficient error management. ### C# Barcode Output Data Formats Guide | IronBarcode Tutorial https://ironsoftware.com/barcode/csharp/how-to/output-data-formats/ IronBarcode is a C# library that provides comprehensive barcode reading capabilities with multiple output formats for .NET applications. The library extracts various data types from barcodes including BarcodeImage, BarcodeType, BinaryValue, coordinates, dimensions, page numbers, orientation, text, and value properties. These output formats enable developers to programmatically process barcode data for diverse use cases such as inventory management, document processing, and quality control applications. The library offers a simple one-line quickstart approach for reading barcode values and types, while also providing advanced features like extracting and saving barcode images through the BarcodeImage property stored as AnyBitmap objects. This flexibility allows developers to manipulate barcode data further within their programs without writing additional extraction code. IronBarcode supports reading barcodes from various sources including PDFs and images, making it a versatile solution for barcode processing workflows in C# applications. ### Read Barcodes from Images in C# - Tutorial & Code Examples https://ironsoftware.com/barcode/csharp/how-to/read-barcodes-from-images/ IronBarcode is a C# library that enables developers to read barcodes from images with just a single line of code using the BarcodeReader.Read() method. The library supports multiple image formats including PNG, JPEG, GIF, BMP, TIFF, and SVG, making it versatile for various applications. Powered by the open-source IronDrawing library, IronBarcode can process both 1D and 2D barcode types out-of-the-box without complex setup requirements. The library offers customizable options through the BarcodeReaderOptions class, allowing developers to configure reading settings, specify barcode regions within images using the CropArea property, and define expected barcode types via the ExpectBarcodeTypes property. Installation is straightforward through Microsoft Visual Studio's NuGet package manager. The simplicity of IronBarcode is demonstrated by its ability to extract barcode data by simply specifying a file name or file path string as a parameter. The tutorial provides code examples and a minimal 5-step workflow, making it accessible for developers to quickly integrate barcode reading functionality into their C# applications. The library's ease of use and comprehensive format support make it an efficient solution for barcode processing needs. ### Read Multipage TIFF & GIF Barcodes in C# | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/read-barcodes-from-multi-page-frame-tiff-gif/ IronBarcode is a C# library that simplifies reading barcodes from multi-page TIFF and animated GIF files by automatically processing all frames without requiring manual frame separation. Using a single BarcodeReader.Read method call, developers can extract all barcodes from every frame or page in an image file, eliminating the traditional complexity of preprocessing multiframe images. The library internally handles frame detection and iteration, supporting standard image formats like JPEG, PNG, BMP, and SVG for single-page images, while specializing in TIFF and animated GIF for multipage scenarios. This automated approach ensures consistent results regardless of frame count while maintaining high performance through optimized memory management. The minimal workflow involves just passing the file path to the Read method, with optional image filters and settings available to improve accuracy and performance. TIFF format is particularly well-suited for document scanning applications as it can store multiple full-resolution images with various compression methods. IronBarcode's intelligent processing removes the burden of extracting individual frames from animations or separating pages from TIFF files, streamlining the barcode reading workflow for developers working with multi-page image documents. ### C# Read Barcodes from PDF Files Tutorial | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/read-barcodes-from-pdf/ IronBarcode provides a powerful solution for reading barcodes directly from PDF documents in C# without requiring image conversion. Using the simple ReadPdf method, developers can extract barcode data from invoices, shipping labels, and reports with just one line of code. This technology automates document processing workflows by detecting and decoding barcodes within PDF pages, eliminating manual scanning needs. The library supports multiple PDF input types including byte arrays, MemoryStreams, file paths, and collections thereof. Basic implementation requires only installing the IronBarcode library and calling BarcodeReader.ReadPdf() with the PDF file path. For advanced scenarios, developers can utilize PdfBarcodeReaderOptions and BarcodeReaderOption classes to customize the reading process. The tutorial demonstrates how to implement barcode reading in five simple steps: installing the library, creating optional reader options, using the ReadPdf method, specifying additional reading parameters if needed, and extracting barcode values. This streamlined approach makes IronBarcode an efficient tool for automating document workflows that rely on barcode data extraction from PDF files, significantly reducing manual processing time and improving accuracy in business applications. ### Read Barcodes from Streams in C# | IronBarcode Tutorial https://ironsoftware.com/barcode/csharp/how-to/read-barcodes-from-streams/ IronBarcode enables C# developers to read barcodes directly from MemoryStream objects without saving to disk, supporting both image and PDF streams. This .NET library eliminates disk I/O overhead, enhances security by keeping sensitive data in memory, and suits cloud environments with limited disk access. Supporting multiple image formats (JPEG, PNG, GIF, TIFF, BMP, SVG), IronBarcode requires just two lines of code to read barcodes from streams. The library's stream processing capabilities are ideal for web applications, APIs, and scenarios involving database-stored images, web uploads, or memory-cached content. Combined with async and multithreading support, developers can process multiple streams concurrently for maximum performance. The tutorial demonstrates reading single image streams and multiple streams from a List, making it efficient for batch processing. This approach is particularly valuable when receiving barcode data as byte arrays or when temporary file creation is undesirable. IronBarcode's stream-based reading functionality streamlines barcode processing workflows in modern .NET applications. ### C# Read Barcodes from System.Drawing | Cross-Platform https://ironsoftware.com/barcode/csharp/how-to/read-barcodes-from-system-drawing/ IronBarcode provides a cross-platform solution for reading barcodes from System.Drawing objects in C#, addressing Microsoft's discontinuation of System.Drawing support on MacOS and Linux. The library achieves this through IronDrawing, a free open-source tool that automatically converts System.Drawing objects to AnyBitmap format. This conversion enables barcode reading functionality across Windows, Mac, and Linux environments. IronDrawing is automatically included when installing IronBarcode from NuGet, eliminating compatibility issues for developers working on non-Windows systems. The solution is remarkably simple, requiring just one line of code to read barcodes: developers can cast System.Drawing.Bitmap objects to AnyBitmap and use IronBarcode's Read method. The library supports implicit casting from various image formats beyond System.Drawing.Bitmap. This approach ensures seamless barcode processing across different operating systems while maintaining the familiar System.Drawing interface that .NET developers commonly use for image processing tasks. The solution is particularly valuable for applications that need to handle graphics, images, and fonts in barcode operations across multiple platforms. ### Read Code 39 Barcodes in C# - Quick Tutorial | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/read-code39-barcodes/ This article provides a comprehensive guide on reading Code 39 barcodes in C# using IronBarcode. Code 39 is a widely-used barcode format in inventory, logistics, and industrial applications that can encode uppercase letters (A-Z), digits (0-9), and several special characters. The standard version has limitations, but Code 39 Extended supports all 128 ASCII characters. The tutorial demonstrates how to implement barcode reading by initializing BarcodeReaderOptions with BarcodeEncoding.Code39 specified, then using the Read method to process barcode images. For extended Code 39 support, developers can enable the UseCode39ExtendedMode option. The article includes practical code examples showing how to read both standard and extended Code 39 barcodes, iterate through results, and display the decoded values. IronBarcode simplifies the process by automatically handling the complexities of barcode recognition while providing optimized performance through format-specific configuration. The guide is particularly useful for developers building inventory management systems, shipment tracking applications, or industrial barcode processing solutions that require reliable Code 39 reading capabilities. ### Read Multiple Barcodes in C# - IronBarcode Tutorial https://ironsoftware.com/barcode/csharp/how-to/read-multiple-barcodes/ IronBarcode is a C# library that enables developers to read multiple barcodes simultaneously from images and PDFs by setting the ExpectMultipleBarcodes property to true. This functionality is particularly valuable for logistics, retail, inventory management, and document processing applications. The library simplifies the process of scanning documents containing multiple barcodes, eliminating the need for complex boilerplate code. By default, IronBarcode scans entire documents for multiple barcodes, though users can customize settings to ensure all barcodes are detected. The library works with both BarcodeReaderOptions and PdfBarcodeReaderOptions classes, supporting various image formats and PDF documents. Advanced scenarios allow for reading mixed barcode types (both 1D and 2D formats) within the same document. The implementation is straightforward - developers simply use the Read method with appropriate options, then iterate through the BarcodeResults to access all detected barcode values. This makes IronBarcode an efficient solution for applications requiring bulk barcode scanning, such as warehouse management systems, retail point-of-sale applications, and automated document processing workflows. ### C# Barcode Reading Speed Options: Fast vs Accurate https://ironsoftware.com/barcode/csharp/how-to/reading-speed-options/ IronBarcode is a C# library that offers four configurable reading speed options for barcode processing: Faster, Balanced, Detailed, and ExtremeDetail. These settings allow developers to optimize the trade-off between processing speed and accuracy based on their specific requirements. The Balanced mode is recommended as the default starting point for most applications. When working with high-quality, clear barcode images, the Faster option provides optimal performance with minimal resource usage. For degraded or poor-quality barcodes, the Detailed and ExtremeDetail modes apply more intensive preprocessing and analysis techniques to improve accuracy at the cost of increased processing time and memory consumption. The library uses the BarcodeReaderOptions class to configure these speed settings, enabling developers to fine-tune performance based on their input image quality and available system resources. Benchmarking tests demonstrate that each speed option offers distinct performance characteristics, allowing developers to make informed decisions about which setting best suits their application's needs, whether prioritizing speed for high-volume processing or accuracy for challenging barcode recognition scenarios. ### C# Barcode Crop Region: 5x Faster Reading | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/set-crop-region/ IronBarcode's crop region feature allows developers to significantly improve barcode reading performance by limiting scanning to specific image areas using the IronSoftware.Drawing.Rectangle object. This targeted approach can achieve processing speeds up to 5x faster than scanning entire images while reducing errors and false positives from non-barcode elements. The feature is particularly valuable for multi-page documents or high-resolution images with predictable barcode locations. Implementation is straightforward - developers simply define a Rectangle with x, y coordinates, width, and height parameters, then pass it to the BarcodeReaderOptions. The workflow involves finding crop region coordinates (using tools like Paint, GIMP, or Photoshop), creating the crop region object, and passing it to the Read method. By focusing the scanning algorithm on relevant areas only, this technique optimizes performance especially when dealing with complex backgrounds or multiple barcodes. The article demonstrates how to implement this feature in just one line of code, making it accessible for developers seeking to enhance their barcode reading applications' efficiency without extensive setup or configuration. ### Add Margins to C# Barcodes | IronBarcode Tutorial https://ironsoftware.com/barcode/csharp/how-to/setting-margins-barcode/ IronBarcode is a C# library that enables developers to add margins (quiet zones) to barcodes for improved scanning reliability. The library offers two methods for margin configuration: SetMargins() with a single parameter for uniform margins on all sides, or an overloaded version with four parameters to set individual margins for top, right, bottom, and left sides. Margins are critical for barcode functionality as they create a blank area around the code that helps scanners distinguish the barcode from surrounding elements like text or graphics. Without adequate margins, scans can fail or return incorrect data, leading to operational issues particularly in logistics and retail sectors. The library supports various barcode formats, each with specific margin requirements for optimal scanning performance. Implementation is straightforward - developers can create a barcode using BarcodeWriter.CreateBarcode(), apply margins using SetMargins(), and save the result in various image formats. The tutorial provides code examples demonstrating both uniform margin application (e.g., SetMargins(50) for 50px on all sides) and custom margin settings for different sides of the barcode. ### How to Write Unicode Barcodes in C# | IronBarcode https://ironsoftware.com/barcode/csharp/how-to/writing-in-unicode/ The article titled "How to Write Unicode Barcodes in C# | IronBarcode" delves into the process of generating Unicode barcodes using the IronBarcode library. Designed for developers working with C#, the guide provides a comprehensive walkthrough on creating barcodes that include international characters, such as Chinese and Arabic scripts. It emphasizes the importance of Unicode in representing a vast range of characters and symbols from different languages, thus enabling global compatibility and integration. The article explains the installation and configuration of IronBarcode, followed by step-by-step instructions on how to encode and generate barcodes that accommodate Unicode characters. Additionally, it highlights best practices for ensuring the accuracy and readability of these barcodes, aiming to help developers overcome common challenges associated with international text representation in barcode systems. By the end of the guide, readers gain practical insights and coding examples that can be directly applied to their projects, thereby enhancing the versatility and functionality of their barcode implementations. This resource is invaluable for those seeking to expand their applications' reach to diverse linguistic audiences through effective barcode technology. ## Code Examples ### C# .NET Barcode Quickstart Guide, Code Examples | IronBarcode https://ironsoftware.com/barcode/csharp/examples/barcode-quickstart/ The C# .NET Barcode Quickstart Guide by IronBarcode provides a comprehensive introduction to generating and managing barcodes using the IronBarcode library. This guide highlights the library's versatility in supporting various file formats, including image files like JPEG, PNG, and JPG, as well as programmatic formats such as bitmap, and external formats like PDF. IronBarcode not only functions as a barcode reader but also as a generator, supporting encoding formats like EAN8, Code128, and Code39. Setting up the barcode generator is efficient and requires minimal code, making it accessible for developers with different levels of expertise. The guide includes examples of creating and resizing barcodes using the BarcodeWriter, and reading barcodes from files using the BarcodeReader. It also introduces BarcodeReaderOptions, which allows developers to customize the reading process, optimizing for speed, handling multiple barcodes, and selecting specific barcode types. These features enable parallel processing and efficient management of barcode reading tasks. Overall, IronBarcode offers a robust solution for barcode handling in C#, with extensive customization options and support for a variety of scenarios. For further details, the guide suggests consulting the documentation and related resources. ### Supported Barcode Formats in C#, Code Examples | IronBarcode https://ironsoftware.com/barcode/csharp/examples/barcode-reader-settings-csharp/ IronBarcode provides a robust solution for reading barcodes in C# through the BarcodeReaderOptions class, which offers a variety of settings to optimize barcode reading processes. The class enables users to balance resource usage and accuracy, customize reading scopes, and improve reading strategies. Options such as ExpectMultipleBarcodes, ExpectBarcodeTypes, CropArea, and MaxParallelThreads are key to enhancing performance. Setting ExpectMultipleBarcodes to false limits the reading process to the first barcode found, boosting efficiency when only one barcode is expected. ExpectBarcodeTypes specifies which barcode types to scan for, facilitating handling of varied formats. CropArea allows users to focus on a specific area within an image, significantly improving reading times and accuracy. MaxParallelThreads limits the number of concurrent threads, optimizing performance on multi-core systems. An example provided demonstrates how to implement these options by initializing BarcodeReaderOptions, setting the desired parameters, and reading barcodes from an image file. The example emphasizes the practical application of these settings to achieve a balance between speed and accuracy tailored to specific barcode reading needs. This configuration makes IronBarcode a versatile tool for developers looking to enhance their barcode reading applications in C#. ### C# Barcode Web Scanner: Real-Time Webcam Scanning with Blazor | IronBarcode https://ironsoftware.com/barcode/csharp/examples/barcode-web-scanner/ The article titled "C# Barcode Web Scanner: Real-Time Webcam Scanning with Blazor" on IronBarcode's website provides a comprehensive guide on building a real-time barcode web scanner using C# and Blazor. It emphasizes the advantage of handling image data as text strings, such as Base64, enabling applications to process images directly from user uploads or webcam feeds without saving them to disk. The article includes a detailed code example that demonstrates converting a Base64 string into an image for barcode scanning. This process involves converting the input string to a byte array, checking for headers like data URIs, and loading the bytes into a MemoryStream to create an Image object. The image is then scanned using IronBarcode's BarcodeReader.Read method, and the result is returned with a timestamp. The article offers a step-by-step guide to setting up the IronBarcode web scanner and includes additional resources such as class documentation, a related tutorial, and a how-to guide. It encourages readers to start a free trial and provides links for downloading IronBarcode DLL and viewing licenses. The page also highlights the impressive total of 2,414,125 NuGet package downloads. ### Detect Barcodes with Machine Learning in C# | IronBarcode https://ironsoftware.com/barcode/csharp/examples/confidence-threshold/ Starting from December 2023, IronBarcode has enhanced its barcode detection capabilities by incorporating machine learning, allowing for more accurate processing. The key feature introduced is the ConfidenceThreshold property within the BarcodeReaderOptions, which sets the minimum confidence level for a barcode detection to be deemed valid. This threshold can be adjusted between 0.0 (least confident) and 1.0 (most confident), with a default setting at 0.7. Users can configure this setting to tailor the detection sensitivity according to their needs. The example provided demonstrates how to set the ConfidenceThreshold to 0.8 for a more stringent detection requirement. The process involves importing the IronBarcode library, instantiating the BarcodeReaderOptions, setting the desired confidence level, and reading barcodes from a specified image file. The detected barcodes, along with their types and values, are then displayed in the console. For scenarios where machine learning is not required, the Barcode.Slim package is recommended. Additional resources such as related documentation, tutorials, and the option to download the IronBarcode DLL are available for further exploration and issue reporting. ### Creating 1BPP barcode images | IronBarcode https://ironsoftware.com/barcode/csharp/examples/create-1-bpp-barcode/ The article titled "Creating 1BPP Barcode Images | IronBarcode" provides a detailed guide on generating 1BPP barcode images using C# with the IronBarcode library. A 1BPP (1-bit-per-pixel) image is a monochrome format ideal for scenarios requiring high contrast and reliability, particularly for machine reading. This format uses one bit per pixel, allowing only two colors, typically black and white, which ensures optimal scanning performance. The guide presents a 5-step process for converting barcodes into 1BPP images. The process begins with importing the IronBarcode library and creating a barcode using the BarcodeWriter.CreateBarcode method, specifying the string value and barcode type, such as "12345" and "EAN8". The barcode is then saved as a 1BPP bitmap using the SaveAs1BppBitmap method. Additionally, the barcode can be saved as 1BPP binary data or a 1BPP image using the To1BppBinaryData and To1BppImage methods, respectively. These options allow for versatile integration into different applications. The article encourages users to explore more examples and related documentation to enhance their understanding and application of IronBarcode for C# projects. ### C# Convert Barcode to Image [Code Example] | IronBarcode https://ironsoftware.com/barcode/csharp/examples/csharp-convert-barcode-to-image/ The article titled "C# Convert Barcode to Image [Code Example] | IronBarcode" provides an overview of how to utilize IronBarcode to convert barcodes into various image and document formats using C#. IronBarcode is a powerful library that enables developers to save barcodes in popular file formats such as PNG, JPG, GIF, TIFF, HTML, PDF, and BMP. Additionally, it supports exporting barcodes to byte arrays and streams, offering versatile options for developers working on different projects. The article emphasizes the ease of integrating IronBarcode into applications, making it a valuable tool for developers needing to handle barcode data in multiple formats. For further guidance, the article provides links to related documentation and tutorials available on GitHub, facilitating a deeper understanding of the implementation process. It also includes resources such as a class documentation link and instructions on downloading the IronBarcode DLL. The page encourages users to report any issues, ensuring continuous improvement and support for developers. Overall, the article acts as a concise guide for leveraging IronBarcode to efficiently manage barcode conversion tasks in C# applications. ### C# Create Barcode [Code Example] | IronBarcode https://ironsoftware.com/barcode/csharp/examples/csharp-create-barcode/ IronBarcode is a versatile tool for generating barcodes in C#. It supports a wide range of standard encoding formats, such as EAN8, Code128, and Code39, making it suitable for standalone barcode generators or integration into existing applications using ByteArray or MemoryStream. The library simplifies the creation process, allowing developers to export barcodes to standard image formats like PNG, JPG, and JPEG. The BarcodeWriter class is central to this functionality, providing the CreateBarcode method, which requires a string value and a BarcodeWriterEncoding enum. This method supports method chaining for additional functionalities like resizing images with ResizeTo and saving them using SaveAsImage. IronBarcode offers multiple variations of the CreateBarcode method to accommodate different data types, including ByteArray and MemoryStream, allowing developers to specify the height and width of the barcode during creation. This flexibility ensures that IronBarcode can meet various development needs, whether for simple barcode generation or deeper application integration. The platform also provides extensive documentation, sample code, and a guide to assist developers in utilizing its features effectively. IronBarcode is a comprehensive solution for C# developers seeking to incorporate barcode functionality into their projects. ### C# Create QR Code [Code Example] | IronBarcode https://ironsoftware.com/barcode/csharp/examples/csharp-create-qr-code/ IronBarcode provides developers with a straightforward and customizable solution for generating QR codes in C#. The process begins by importing the IronBarcode library and utilizing the QRCodeWriter class to create QR codes with a string value, such as a URL. The simplest method involves using the QRCodeWriter.CreateQrCode function, which generates a QR code with default settings. For more advanced customization, developers can adjust the error correction level, which enhances the QR code's fault tolerance by including more redundancy or error recovery data. Additionally, the size of the QR code can be set by assigning an integer value, and the qrVersion, which ranges from 1 to 40, can be specified to balance between data capacity and physical size. This allows the QR code to be optimized based on the amount of data it needs to store. By passing the defined variables—size, qrVersion, and correction level—into the QRCodeWriter.CreateQrCode method, developers can generate a customized QR code tailored to their specific needs. IronBarcode's documentation provides further guidance on determining the appropriate QR code version and offers additional resources, including sample code and how-to guides, for effective QR code creation. ### C# Custom Barcode [Code Example] | IronBarcode https://ironsoftware.com/barcode/csharp/examples/csharp-custom-barcode/ The article "C# Custom Barcode [Code Example] | IronBarcode" explains how to create and customize barcodes using the IronBarcode library in C#. It provides a step-by-step guide on generating a QR code and customizing its appearance. The process begins by importing the IronBarcode library, which contains the necessary classes and methods for barcode creation. A BarcodeWriter instance is then initialized with specific properties, such as the format (QRCode) and the content to encode (a URL). Users can customize the barcode's appearance by resizing it to 500x500 pixels and altering its colors. Methods like `ChangeBarCodeColor` and `ChangeBackgroundColor` allow changes to the bar and background colors, respectively, enabling the creation of visually appealing barcodes. The barcode is saved as a PNG file with the `SaveAsPng` method. For enhanced image detail, the DPI (dots per inch) can be adjusted using `ResizeToDPI(300)`, setting it to 300 for finer image quality. The article also provides links to related documentation, tutorials, and guides, offering additional resources for users looking to explore more features of IronBarcode. It’s a useful guide for developers interested in barcode generation and customization. ### C# Custom QR Code [Code Example] | IronBarcode https://ironsoftware.com/barcode/csharp/examples/csharp-custom-qr-code/ The article titled "C# Custom QR Code [Code Example]" from IronBarcode provides a comprehensive guide on creating and customizing QR codes using the IronBarcode library in C#. The tutorial explains how to generate QR codes with personalized features such as logos, colors, annotations, and margins. It begins by instructing users to import the IronBarcode library, essential for QR code manipulation. The QRCodeWriter.CreateQrCode method is used to generate a QR code for a specified URL with dimensions of 500x500 pixels. Users can customize the QR code's appearance by changing its foreground and background colors with the ChangeBarCodeColor method, demonstrated using BlueViolet and LightCyan colors. A logo can be centrally embedded using the QRCodeWriter.CreateQrCodeWithLogo method with a QRCodeLogo instance, where users should replace "path/to/logo.png" with their logo's file path. The AddBarcodeValueTextBelowBarcode method allows adding annotation text below the QR code for easier content identification. The SetMargins method enables setting a uniform margin around the QR code, defaulting to 10 pixels. The completed QR code is then saved as a PNG file named "CustomQRCode.png". The article concludes with a prompt to ensure customization of file paths and parameters to suit specific project needs, along with links to related documentation and support resources. ### C# Read Barcode From PDF [Code Example] | IronBarcode https://ironsoftware.com/barcode/csharp/examples/csharp-read-barcode-from-pdf/ The article on IronBarcode's website explains how to efficiently read barcodes, including QR codes, using the IronBarcode library in C# .NET. It details the versatility of IronBarcode, which supports various barcode formats and offers multiple methods for reading barcodes depending on the developer's needs. The library enables reading barcodes from different sources such as PNG, JPEG, Bitmap images, and streams, and it provides a specialized method, ReadPdf, for extracting barcodes from PDF documents. The BarcodeReader.Read method allows developers to input file paths for standard image formats to swiftly retrieve barcode data, and it supports both Bitmap and AnyBitmap classes, ensuring compatibility across different .NET versions, including .NET 7, .NET 6, .NET 5, and .NET Core. This flexibility promotes seamless code writing and variable handling without platform constraints. Additionally, the BarcodeReader class offers customization through BarcodeReaderOptions, enabling developers to fine-tune their barcode reading processes. This includes options like reading only the first barcode for efficiency, targeting specific barcode types, and leveraging multithreading. The article also references a comprehensive how-to guide, complete with examples and sample code, for further assistance. ### C# Read Barcode From URL Asynchronous | IronBarcode https://ironsoftware.com/barcode/csharp/examples/csharp-read-barcode-from-url-asynchronous/ The article titled "C# Read Barcode From URL Asynchronous | IronBarcode" provides a guide on how to read barcodes and QR codes asynchronously in C# using the IronBarcode library. It explains the use of the BarcodeReader class, focusing on the Read method for synchronous operations and the ReadAsync method for asynchronous tasks. The article includes code examples demonstrating how to read barcodes from image files using these methods. It highlights the customization of barcode reading through BarcodeReaderOptions, which includes settings such as ExpectMultipleBarcodes, Speed, and Multithreaded. ExpectMultipleBarcodes allows detection of multiple barcodes in a single image, the Speed setting (via the ReadingSpeed enum) trades off reading accuracy against speed, and Multithreaded enables multithreaded reading to boost processing efficiency for large datasets. The discussion emphasizes the advantages of using asynchronous methods to allow other tasks to proceed while barcode reading occurs. Additionally, the article provides links to related documentation, tutorials, and a GitHub page for further exploration. This guide is particularly useful for developers looking to integrate efficient barcode reading in their applications using C# and .NET frameworks. ### Imperfect C# Barcode and Image Correction, Code Examples | IronBarcode https://ironsoftware.com/barcode/csharp/examples/imperfect-barcode-with-image-correction/ The article titled "Imperfect C# Barcode and Image Correction, Code Examples | IronBarcode" focuses on addressing the challenges of reading imperfect barcodes using the IronBarcode library in C#. It highlights the use of various image pre-processing filters such as Sharpen, Binary Threshold, and Contrast that can be applied through the BarcodeReaderOptions to enhance barcode scanning accuracy in difficult conditions. The article emphasizes the importance of the sequence in which these filters are applied, as it affects the outcome of the barcode reading process. Additionally, it introduces the CacheAtEachIteration property of the ImageFilterCollection, which allows saving intermediate images at each stage of filter application, facilitating debugging and analysis. The article provides a practical C# code example that demonstrates the configuration of BarcodeReaderOptions with the mentioned filters and the process of reading a barcode from an image file. It concludes with an example of displaying the barcode type and value on the console. This guide serves as a valuable resource for developers looking to improve barcode scanning reliability and performance using IronBarcode in scenarios where barcode images are less than ideal. ### Set Max Parallel Threads | IronBarcode https://ironsoftware.com/barcode/csharp/examples/max-parallel-thread/ In the article titled "Set Max Parallel Threads | IronBarcode," the focus is on optimizing barcode generation performance in C# applications using IronBarcode. The guide highlights the advantages of utilizing parallel threads to expedite the processing of large batches of documents or images, which can otherwise lead to bottlenecks in high-volume applications. By enabling multi-threading, multiple images can be processed simultaneously, significantly reducing execution time. A step-by-step code example is provided, demonstrating how to configure IronBarcode for multi-threading. The process begins by importing the IronBarcode library and the threading namespace, followed by defining a list of image file paths to be processed. A BarcodeReaderOptions object is then instantiated, where the Multithreaded property is set to true, and the MaxParallelThreads property is configured to use up to four simultaneous threads. This setup balances performance with system resource usage. The BarcodeReader's Read method is called with the list of image paths and the configured options to retrieve barcode results efficiently. The article encourages developers to implement these steps to enhance the performance of their barcode reading applications. ### PDF Barcode Reader Settings in C# | IronBarcode https://ironsoftware.com/barcode/csharp/examples/pdf-barcode-reader-settings-csharp/ The article titled "PDF Barcode Reader Settings in C# | IronBarcode" provides a detailed guide on customizing the PDF Barcode Reader using the IronBarcode library. It introduces the PdfBarcodeReaderOptions class, which offers various settings to optimize the reading of barcodes from PDFs. Key functionalities include handling PDF passwords, selecting specific pages for scanning, and setting the DPI for parsing to enhance barcode detection accuracy. Users can also adjust the Scale factor for better read quality. The article provides a C# code example demonstrating the implementation of these settings. The code imports necessary namespaces, creates an instance of PdfBarcodeReaderOptions to define the PDF processing options, and uses the BarcodeReader.ReadPdf method to load and decode barcodes from a sample PDF file. The decoded results, including barcode type and value, are then printed to the console. The article highlights the importance of these customizable settings in improving the accuracy and efficiency of barcode detection in PDFs. Additionally, it includes links to related documentation, tutorials, and resources for further learning and troubleshooting. ### Read Code 39 Barcodes | IronBarcode https://ironsoftware.com/barcode/csharp/examples/read-code39-barcode/ The web page from IronBarcode provides an insightful guide on reading Code 39 barcodes using C#. Code 39 is a versatile barcode format, frequently utilized in inventory, logistics, and industrial applications due to its ability to encode uppercase letters, digits, and some special characters. The page details the process of reading both standard and extended Code 39 barcodes with IronBarcode, a library that supports full barcode functionality. The guide is structured into a simple 4-step process. It begins by importing the IronBarcode library and configuring a BarcodeReaderOptions object to specify that the reader should focus on Code 39 barcodes. By employing the BarcodeReader.Read method, users can input the path to the barcode image and the configured options to retrieve a collection of BarcodeResult objects. The decoded string value of the barcode can then be printed to the console. This comprehensive tutorial not only explains the code but encourages developers to explore further resources such as related documentation, tutorials, and downloadable content. IronBarcode's library aims to streamline the barcode reading process, facilitating seamless integration into various applications. The page also provides links to additional resources and reports over 2M+ NuGet downloads. ### Set Reading Speeds | IronBarcode https://ironsoftware.com/barcode/csharp/examples/reading-speeds/ The article "Set Reading Speeds" on IronBarcode's website provides an insightful guide on optimizing barcode scanning speeds in C# applications. IronBarcode offers developers the ability to balance scanning performance and resource efficiency, allowing for tailored adjustments based on the quality of input images and available computing resources. The article introduces a 4-step guide to selecting the appropriate reading speed using the BarcodeReaderOptions class, where the Speed property is adjustable for various requirements. The default ReadingSpeed.Balanced option strikes a harmony between performance and accuracy, ideal for standard usage scenarios. Developers are guided to instantiate BarcodeReaderOptions, set the desired speed, and use the Read method to process and retrieve barcode information from images. The adaptability of IronBarcode allows for performance optimization to meet specific needs, whether it's fast processing for clear images or enhanced accuracy for complex ones. The article further provides links to tutorials, documentation, and download options, encouraging developers to explore more about IronBarcode's capabilities. With over 2M+ downloads, IronBarcode remains a popular choice for developers looking to implement efficient barcode scanning functionalities in their applications. ### Set Barcodes Margins | IronBarcode https://ironsoftware.com/barcode/csharp/examples/setting-margins-barcode/ Setting margins on barcodes is crucial for ensuring reliable scanning. The margins, or quiet zones, are blank spaces surrounding the barcode, helping scanners accurately identify where the barcode begins and ends, thus preventing read errors caused by nearby text or graphics. The article on IronBarcode's website provides a practical guide on implementing such margins using C#. It details a three-step process using the IronBarcode library. First, the BarcodeWriter.CreateBarcode method generates a barcode by accepting a string value and barcode type, such as QRCode. Then, the SetMargins method is invoked on the GeneratedBarcode object, where an integer, representing pixel width, establishes the margin size on all four sides. The example applies a 100-pixel margin to a QR code, enhancing its readability. Additionally, the article links to related documentation and resources for further exploration, offering a comprehensive toolkit for optimizing barcode design. It encourages users to download IronBarcode via NuGet for implementation, highlighting its widespread adoption with over 2M+ downloads. Whether for beginners or advanced users, this guide equips readers with the knowledge to enhance their barcode projects effectively. ### Write Unicode Barcodes in C# for .NET 10 | IronBarcode https://ironsoftware.com/barcode/csharp/examples/unicode/ The article "Write Unicode Barcodes in C# | IronBarcode" provides a comprehensive guide on generating barcodes with Unicode characters using IronBarcode. This functionality is particularly advantageous for developers aiming to create barcodes that incorporate multiple languages, such as those found on products from Japan and Egypt, without converting text to ASCII or other lossy formats. The guide outlines a straightforward three-step process to write Unicode barcodes. Firstly, define the string value incorporating languages such as English, Chinese, and Arabic. Secondly, use the BarcodeWriter class to create the barcode with supported encodings like PDF417, DataMatrix, or QRCode, as linear barcodes like Code 128 and Code 39 are limited to ASCII. Finally, save the generated barcode as an image. The article emphasizes the flexibility and efficiency of IronBarcode in handling multilingual text and provides additional resources such as links to related tutorials, documentation, and download options for the IronBarcode DLL. This guide is essential for developers seeking to streamline their barcode generation processes while accommodating diverse linguistic requirements. ## Troubleshooting ### AnyBitmap to System.Drawing.Bitmap in .NET Framework https://ironsoftware.com/barcode/csharp/troubleshooting/anybitmap-to-system-drawing-bitmap/ In .NET Framework desktop applications, developers encounter a common issue when attempting to assign IronBarcode's `AnyBitmap` directly to a `System.Drawing.Image` or `Bitmap`, resulting in a compile-time error. This problem typically arises when binding a generated barcode to a `PictureBox`, which necessitates a `System.Drawing.Image` object. The error occurs because `AnyBitmap` supports implicit conversion to `System.Drawing.Bitmap` or `Image` only in .NET 6 and higher versions, not in .NET Framework due to compatibility issues between libraries. To resolve this, two solutions are proposed. The first solution involves installing the `System.Drawing.Common` NuGet package to ensure conversion operators resolve correctly within a consistent drawing assembly. The second solution suggests converting the bitmap through a GDI-compatible stream, allowing the resulting image to be utilized by the `PictureBox`. This method involves using `ToWindowsBitmapStream()` to create a GDI-compatible image format, which can then be parsed into a native `System.Drawing.Image` using `Image.FromStream`. These solutions offer clear pathways for developers facing this conversion challenge in the .NET Framework environment. ### Apply a License Key in IronBarcode https://ironsoftware.com/barcode/csharp/troubleshooting/apply-a-license-key-in-ironbarcode/ The article titled "Apply a License Key in IronBarcode" provides a comprehensive guide on how to correctly apply a license key in the IronBarcode library to ensure proper software licensing. The license key, a long string containing an expiration date, signifies the end of support but allows perpetual use of versions released prior to this date. It is crucial to copy the key accurately without spaces. The recommended method for applying the license key is by embedding it directly in the code before invoking the library. This can be achieved by declaring the license key within your C# code as follows: `IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01-RENEW.SUPPORT.01.JAN.2050";`. Additionally, the article mentions alternative configurations such as using `web.config`, `app.config`, and `appsettings.json`, and directs readers to another detailed article titled "Using IronBarcode License Keys" for further information on these methods. This step-by-step guide is aimed at ensuring users can apply their license keys successfully and continue utilizing the IronBarcode software efficiently. ### IronBarcode Architecture (2025.2+) https://ironsoftware.com/barcode/csharp/troubleshooting/architecture-overview/ The IronBarcode package has undergone a significant restructuring as of version 2025.2, aligning its architecture with IronOCR and IronPDF for improved cross-platform support and maintenance. The package now comprises three distinct layers: managed, native, and machine learning. This modular framework is reflected in the top-level NuGet packages which target specific platforms, with `BarCode` being the default for Windows and OS-specific packages like `BarCode.Linux` and `BarCode.MacOS`. The internal structure is divided into subpackages such as `BarCode.Slim` for the managed core, `IronSoftware.ReaderInternals.XXX` for native C++ barcode operations, and `BarCode.Detection` for machine learning detection, leveraging ONNX Runtime. Notably, `BarCode.Detection` is excluded from mobile platforms due to performance and compatibility concerns. This restructured architecture offers several advantages including modular separation, OS-targeted packaging, and future-proofing for native ML detection, enhancing the synergy with other Iron Software libraries and simplifying maintenance and troubleshooting processes. ### IronBarcode AWS Lambda Runtime Fix https://ironsoftware.com/barcode/csharp/troubleshooting/aws-lambda-runtime-exited-signal-killed/ The article titled "IronBarcode AWS Lambda Runtime Fix" addresses the issue of runtime exit signal errors encountered when generating and reading barcodes using IronBarcode in .NET applications on AWS Lambda. The specific error message, "Runtime exited with error: signal: killed," indicates a problem typically arising from insufficient memory allocation. This occurs when an application attempts to perform tasks that surpass the available memory on the host machine or within a container environment. As memory usage approaches the system's limit, the process is abruptly terminated, leading to the "signal: killed" error. To resolve this issue, the article provides a clear solution involving memory allocation adjustments. It outlines the steps to increase memory for an AWS Lambda function: accessing the AWS Management Console, navigating to Lambda functions, selecting the problematic function, and modifying the memory allocation settings under the 'General configuration' section. By following these steps, developers can better manage memory resources, preventing the runtime exit error and ensuring smoother operation of barcode generation and reading tasks in their applications. ### Barcode Not Recognized https://ironsoftware.com/barcode/csharp/troubleshooting/barcode-not-recognized/ The article titled "Barcode Not Recognized" on IronBarcode's website addresses common issues and solutions related to unreadable barcodes during scanning. It outlines several potential causes for this problem, including unsupported barcode encoding, low-resolution images, improper barcode positioning, and imperfect barcode images due to factors like glare or blurriness. The article suggests several troubleshooting steps to enhance barcode recognition. First, it recommends specifying the barcode encoding using the `ExpectBarcodeTypes` property in the `BarcodeReaderOptions` class, which can improve detection accuracy. It also advises applying image correction filters available in IronBarcode to rectify low-resolution or imperfect images. Positioning barcodes correctly is emphasized, with a suggestion to specify their location using the `CropArea` property to enhance detection and performance. Additionally, converting PDFs to uncompressed image formats like TIFF or PNG and increasing the DPI for PDF documents can sharpen barcodes and improve readability. Helpful articles related to reading barcodes from various file formats and further assistance options, such as submitting an engineering request, are also provided for users seeking additional support. The guidance aims to improve barcode scanning accuracy using IronBarcode. ### MSI Barcode Not Recognized | IronBarcode Troubleshooting https://ironsoftware.com/barcode/csharp/troubleshooting/could-not-recognize-msi-barcode/ The article titled "MSI Barcode Not Recognized" from IronBarcode provides insights into troubleshooting issues related to the recognition of MSI barcodes. It discusses common problems that users may encounter when scanning MSI barcodes and offers solutions to improve barcode scanning accuracy. The article emphasizes the importance of understanding the limitations of barcode recognition and provides practical tips for developers using IronBarcode, a library for reading and writing barcodes in C#. It serves as a guide for effectively managing barcode recognition issues in applications. ### Submit Engineering Requests for IronBarcode Improvements https://ironsoftware.com/barcode/csharp/troubleshooting/engineering-request-bc/ The article titled "Submit Engineering Requests for IronBarcode Improvements" provides guidance on how to make engineering support requests for IronBarcode, a product by IronSoftware. Recognizing that the majority of their features and updates stem from customer feedback, the company encourages a collaborative approach between users and developers to address technical challenges. To provide effective support, the engineering team requires detailed, platform-specific information to replicate issues and develop regression tests. Users are advised to send all support requests to support@ironsoftware.com. A well-crafted technical report should include a clear description of the symptoms, the environment details like IronBarcode version, OS, and .NET runtime version, and the application/project type. The article also urges users to include a project example, a code snippet, screenshots, exception messages, and specific debugging points to expedite ticket prioritization. For barcode reading issues, users are directed to review linked articles on supported barcode formats and troubleshooting steps. If issues persist, users should send a copy of the input file for further diagnosis. This structured approach aims to enhance the feedback loop and ensure efficient resolution of technical issues. ### Avoiding False Positives in Barcode Scanning https://ironsoftware.com/barcode/csharp/troubleshooting/false-positives/ The article "Avoiding False Positives in Barcode Scanning" on IronSoftware's website addresses how to reduce false positives when using IronBarcode for barcode scanning. False positives may arise when complex backgrounds mimic barcodes or when noise and artifacts generate unintended marks that are incorrectly identified as barcodes. To mitigate this issue, the article suggests several strategies. First, users should configure IronBarcode to recognize only the desired barcode formats by specifying expected barcode types. A comprehensive list of these types is available on the IronBarcode website. Secondly, enabling the `RemoveFalsePositive` property ensures that IronBarcode only decodes regions without errors in their encoding, which is the default setting. The article provides a C# code example demonstrating how to create a `BarcodeReaderOptions` object, specify the expected barcode types, and enable the removal of false positives. This example shows how to read a barcode from an image file using the defined options, allowing users to process the results by displaying or logging them. By following these methods, users can significantly improve the accuracy of barcode recognition and reduce the occurrence of false positives in their scanning processes. ### Understanding GS1-128 with IronBarcode https://ironsoftware.com/barcode/csharp/troubleshooting/gs1-128/ The article "Understanding GS1-128 with IronBarcode" provides insights into troubleshooting GS1-128 barcode issues using IronBarcode. While IronBarcode supports GS1 UCC/EAN-128 symbology, a noted issue is the absence of brackets in the displayed barcode value. Currently, IronBarcode outputs a Code 128 barcode with a GS1 signature, which barcode scanners recognize as `(01)95012345678903(3103)000123`. The article offers a C# code example for generating a GS1-128 barcode with IronBarcode, highlighting the process of creating the barcode, adding value text below it, and saving it as a PNG file. To address the challenge of unwanted Unicode characters (such as ñ) appearing in the barcode text, the article suggests manipulating the string by replacing these characters before passing it to the `AddAnnotationTextBelowBarcode` method. This workaround helps achieve the desired barcode value display. When scanned, the barcode outputs the intended format and is recognized as `GS1Code128`. The article includes code snippets and visual examples demonstrating the output, guiding users in effectively generating and reading GS1-128 barcodes with IronBarcode. ### IronBarcode Security CVE: Keep Your Code Safe https://ironsoftware.com/barcode/csharp/troubleshooting/ironbarcode-security-cve/ The article titled "IronBarcode Security CVE: Keep Your Code Safe" from Iron Software provides insights into the security measures and updates regarding IronBarcode, a barcode generation library. The page highlights that all Iron Software products, including IronBarcode, are DigiCert certified, ensuring a high level of security and trust. The article emphasizes that IronBarcode does not expose COM or COM+ interfaces, minimizing potential security risks. It also outlines the limited entry points to the API, enhancing its security profile. The library is designed with strong naming conventions and sophisticated tamper protection to prevent unauthorized alterations. Furthermore, a rigorous code review process is in place; every line of code undergoes at least two levels of human review by senior engineers to identify and rectify any security vulnerabilities. Importantly, IronBarcode does not interact with unmanaged code, which can often be a source of security issues. The article underscores the significance of staying informed about security updates and CVE disclosures to effectively address potential vulnerabilities, ensuring that developers can maintain the security and integrity of their applications using IronBarcode. ### License Key Troubleshooting: IronBarcode | IronBarcode https://ironsoftware.com/barcode/csharp/troubleshooting/license-key-web.config/ The article titled "License Key Troubleshooting: IronBarcode" provides guidance on embedding and troubleshooting the IronBarcode license key in ASP.NET's web.config file to ensure smooth barcode operations. It addresses a specific licensing issue found in IronBarcode versions between 2023.4.1 and 2024.3.2, affecting ASP.NET projects using .NET Framework version 4.6.2 or newer. The problem is resolved in the updated version 2024.3.2 of IronBarcode, but for those using older versions, the license key stored in the web.config file is not automatically recognized by the software. As a workaround, developers are advised to manually retrieve the license key from the web.config file using the ConfigurationManager class in their code and then apply it to the License.LicenseKey property. The article provides an example XML configuration and corresponding C# code to illustrate how to implement this workaround. This proactive approach ensures that the IronBarcode functions correctly without encountering licensing exceptions during development. ### Missing DLLs in Creating MSI Installer | IronBarcode https://ironsoftware.com/barcode/csharp/troubleshooting/missing-dll-msi-installer/ In the process of creating an MSI installer with IronBarcode, developers may encounter a specific error due to missing DLL files, which affects the execution of the IronBarcode Machine Learning library. This issue is primarily caused by the absence of necessary files, leading to exceptions such as `IronBarcodeDetectionException` and `TypeInitializationException`. To resolve this, it is crucial to ensure the inclusion of three specific DLL files within the setup project: `onnxruntime.dll`, `IronBarcodeInterop.dll`, and `ReaderInterop.dll`. These files are generated during the build process in Release mode and are located in designated directories. The `onnxruntime.dll` can be found in the `bin\Release` directory, while both `IronBarcodeInterop.dll` and `ReaderInterop.dll` are situated in `runtimes\win-x86\native`. Incorporating these files into the Setup Project is essential for preventing errors and ensuring the smooth operation of the MSI installer. For further assistance or unresolved issues, users are advised to contact Iron Software support. This guidance aims to streamline the deployment process and maintain the functionality of applications utilizing IronBarcode technology. ### ML.OnnxRuntime Build Error https://ironsoftware.com/barcode/csharp/troubleshooting/ml-onnxruntime-build-error/ In the article "ML.OnnxRuntime Build Error," the IronBarcode package users may encounter an error during the build process involving the `onnxruntime_session_options_config_keys.h` file. This problem arises when the Microsoft.ML.OnnxRuntime package is not properly installed after adding project references from the IronBarcode ZIP file but before the project's initial build. The error is linked to a file copy operation that exceeds the retry count due to incorrect assembly configuration. Although this is a known issue within the Microsoft build system, a direct solution is not available. The article suggests resolving the error by starting with a new project, ensuring dependencies are installed in a specific order: first adding IronBarcode DLL references, then installing the Microsoft.ML.OnnxRuntime package via the NuGet package manager or command line. Finally, building the project in this sequence helps the build system properly resolve all dependencies, avoiding the error and enabling successful project compilation. ### IronBarcode NuGet Fails on Visual Studio 2015 https://ironsoftware.com/barcode/csharp/troubleshooting/nuget-install-fails-visual-studio-2015/ The article "IronBarcode NuGet Fails on Visual Studio 2015" addresses the issues encountered when installing IronBarcode in Visual Studio 2015 for VB.NET projects on .NET Framework versions 4.5 to 4.8. The primary problem is attributed to Visual Studio 2015's lack of full support for `netstandard2.0`, a format targeted by IronBarcode, which results in installation failures or the package not loading after addition. To resolve these issues, the article recommends several solutions. Firstly, upgrading to Visual Studio 2022 is advised, as it supports the `netstandard2.0` format and allows for a seamless installation of IronBarcode. Secondly, updating to the latest version of IronBarcode, specifically `2026.4.2` or newer, is suggested to ensure compatibility with current tooling. Additionally, installing the .NET Framework 4.8 Developer Pack and runtime on the build machine is recommended. Lastly, the article advocates for migrating project NuGet references to `PackageReference` from the older `packages.config`, as it better manages transitive dependencies and modern package formats. These steps collectively aim to facilitate the successful integration and functionality of IronBarcode in development environments. ### IronBarcode NuGet Packages https://ironsoftware.com/barcode/csharp/troubleshooting/nuget-packages/ The article titled "IronBarcode NuGet Packages" provides a guide for troubleshooting issues related to IronBarcode NuGet packages. It particularly focuses on differentiating between two specific packages: BarCode.Slim and BarCode. BarCode.Slim is a streamlined version that does not include the Machine Learning feature for detecting barcodes. In contrast, the BarCode package includes this Machine Learning capability, relying on dependencies such as BarCode.Slim and Microsoft.ML.OnnxRuntime to function. This distinction is crucial for developers to understand when selecting the appropriate package for their barcode detection needs. The article aims to offer solutions to common problems encountered during the installation and usage of these NuGet packages, ensuring smoother integration and functionality within projects. By clarifying the differences and dependencies between these packages, the article assists developers in making informed decisions and troubleshooting more effectively. ### High Peak Memory During ReadPdf on Large PDFs https://ironsoftware.com/barcode/csharp/troubleshooting/readpdf-high-peak-memory/ The article titled "High Peak Memory During ReadPdf on Large PDFs" discusses the challenges of memory spikes when using the `BarcodeReader.ReadPdf()` method on extensive PDF files. When the method processes a large PDF in one go, it holds all pages in memory, which can lead to significant peak memory usage, sometimes reaching 12GB, especially with high-DPI settings. This can be problematic in memory-limited environments. The article suggests several solutions to mitigate this issue. Firstly, it recommends splitting the document into smaller page chunks using `PdfBarcodeReaderOptions.PageNumbers`, which allows processing only one chunk at a time, thus reducing memory usage. Additionally, it advises caching the PDF stream and resetting its position before processing each chunk, constructing reader options once outside the loop, and adjusting only `PageNumbers` per iteration. Finally, it suggests pre-sizing the results list to prevent unnecessary memory allocation as barcodes are added. By implementing these strategies, users can manage memory more efficiently and prevent failures due to high memory demands when reading large PDFs. ### Troubleshooting `Runtimes Copy Exception` | IronBarcode https://ironsoftware.com/barcode/csharp/troubleshooting/runtimes-copy-exception/ The article titled "Troubleshooting `Runtimes Copy Exception` | IronBarcode" provides guidance on resolving the "copy exception" error encountered in IronBarcode, particularly when dealing with machine learning DLLs. This error occurs when the DLLs associated with the machine learning model are not properly copied from the runtimes directory, which can happen across different operating systems or frameworks. To resolve this issue, the article suggests a manual solution: navigate to the `runtimes` folder located at `/bin/Debug/net6.0/runtimes` (or the equivalent path for your specific configuration and framework), identify the applicable platform directory, and manually copy the necessary files to the output directory (`/bin/Debug/net6.0/`). Additionally, users can opt to disable the machine learning scan to prevent this error, although this may reduce the accuracy of barcode detection since ML features enhance this capability. The article also provides a code snippet demonstrating how to configure barcode scanning options to disable machine learning, thereby utilizing only the basic scan mode during barcode reading operations. This approach ensures users can maintain functionality while troubleshooting and adjusting deployment settings in C#. ### System.Drawing.Common Issues in IronBarcode: Fixes https://ironsoftware.com/barcode/csharp/troubleshooting/system-drawing-common-ironbarcode/ The article discusses the issues and solutions related to the use of the _System.Drawing.Common_ library in IronBarcode, especially with the advent of .NET 6, which limits its compatibility exclusively to Windows. For non-Windows platforms, attempting to use _System.Drawing.Common_ without proper configuration results in a `TypeInitializationException` with an inner `PlatformNotSupportedException`. The article highlights that the .NET 6 platform analyzer provides compile-time warnings for non-Windows systems, and a runtime exception is thrown unless specific configuration adjustments are made. The temporary workaround suggested involves modifying the `runtimeconfig.json` file to enable Unix support, thereby bypassing the restrictions. Iron Software offers an alternative solution with its open-source IronDrawing library, which can serve as a replacement for _System.Drawing.Common_. The article provides a link to further documentation on IronDrawing and references Microsoft's official guidance for more detailed information on enabling non-Windows support. This practical advice aims to assist developers in overcoming the platform limitations imposed by System.Drawing in the latest .NET framework versions. ## Product Updates ### IronBarcode Changelog | IronBarcode https://ironsoftware.com/barcode/csharp/product-updates/changelog/ The IronBarcode changelog provides a detailed history of updates, enhancements, and bug fixes for the IronBarcode library, as utilized in C#. The changelog narrates the product's evolution, driven by community feedback and technological advancements in image filters, computer vision, and machine learning. The roadmap aims to expand the library's applications and support multiple programming languages. Recent updates, such as the June 2025 release (v2025.6.5), resolve issues like barcode annotation cut-offs and enhance text appearance. The May 2025 update (v2025.5.8) introduced new features like the `ReadPdfs` method, improving performance and pre-processing capabilities. Earlier updates focused on improving compatibility across platforms (February 2025) and introducing machine learning models for enhanced barcode reading (December 2023). The changelog also documents improvements in barcode writing support, performance, and platform compatibility, including support for .NET 6 and Linux distributions. Through continuous updates, IronBarcode aims to address user needs effectively, enhancing the library's robustness and utility in diverse environments. ### Milestone: Expanding Support for Modern Barcode Developement | IronBarcode https://ironsoftware.com/barcode/csharp/product-updates/milestones-microqr-rmqr/ IronBarcode has introduced support for Micro QR and Rectangular Micro QR (rMQR) codes in its 2024.8 release, marking a significant milestone in modern barcode development. These new formats represent a leap towards space-efficient, high-density barcoding, expanding beyond traditional QR codes. Micro QR Codes, ranging from 11×11 to 17×17 modules, require only a single orientation pattern, allowing for more compact printing. The rMQR Code, a rectangular matrix-type code, facilitates easy reading and printing in narrow spaces while accommodating more data than Micro QR Codes. These updates cater to industries like manufacturing, healthcare, logistics, and retail, offering compact barcodes that enhance tracking and labeling in small areas. The addition of these formats enables developers to manage various barcode types within a single tool, streamlining workflows. The update also enhances IronBarcode’s capability to support high-density, space-efficient 2D barcodes, suitable for constrained layouts with minimal quiet zones. With rMQR’s structure and data capacity, developers can integrate codes into narrow packaging, expanding possibilities for modern barcode applications in .NET. This update positions IronBarcode as a comprehensive solution, offering industry-specific options and optimized encoding/decoding performance, unlocking new development potential. ### Milestone: New Writing Support for MaxiCode, Intelligent Mail, Databar, and More | IronBarcode https://ironsoftware.com/barcode/csharp/product-updates/milestones-new-formats/ IronBarcode has expanded its capabilities significantly with the release of v2024.11, adding writing support for new barcode formats such as MaxiCode, Intelligent Mail, Databar, Databar Expanded, Micro QR, and rMQR. These additions open up diverse possibilities for developers, facilitating easier integration of barcodes across industries like logistics, retail, and healthcare. The new formats offer flexibility, efficiency, and accuracy, enabling developers to choose the most suitable barcode type for their specific needs. This update simplifies workflows by allowing developers to manage multiple barcode types from a single library, enhancing data handling and reducing errors. Compact formats like Micro QR and rMQR are particularly beneficial for space-constrained environments, while high-density data encoding is ideal for detailed tracking and industry-specific applications. Real-world applications of these new features include improved logistics through MaxiCode, enhanced medication tracking in healthcare with Databar, and more efficient warehouse management using rMQR. The update signifies a major milestone for IronBarcode, providing a comprehensive and versatile barcode toolkit for .NET developers, optimized for modern demands in speed, accuracy, and flexibility across various sectors. IronBarcode now stands as a powerful solution for high-density encoding and space-efficient layouts, driving advancements in barcode technology.