Skip to footer content
MIGRATION GUIDES

Migrating from Syncfusion Barcode to IronBarcode

This guide provides a complete migration path from Syncfusion's barcode controls — SfBarcode for WinForms and WPF, SfBarcodeGenerator for Blazor and MAUI — to IronBarcode. It covers the structural reasons teams make this transition, a step-by-step quick start for replacing the NuGet packages and license setup, full before-and-after code examples for every common scenario, and a migration checklist for auditing an existing codebase. If the project also uses other Syncfusion components (grids, charts, schedulers), those packages and their registrations are unaffected — only the barcode-specific code changes.

Why Migrate from Syncfusion Barcode

Reading Gap: SfBarcode and SfBarcodeGenerator are generation controls with no reading capability. There is no .Read() or .Scan() method in either class. When a project requires reading barcodes from uploaded images, scanned documents, or PDF files, the Syncfusion barcode control offers no path forward. The Syncfusion documentation directs teams to Barcode Reader OPX as the solution, which is a separate commercial product that must be purchased, licensed, and maintained independently.

OPX as a Paid Wrapper Around Free Software: Barcode Reader OPX uses ZXing.Net internally — an open-source barcode reading library published under the Apache 2.0 license. Apache 2.0 is a permissive license; any .NET developer can install ZXing.Net directly with dotnet add package ZXing.Net and use it in commercial applications at no cost. A complete Syncfusion read-and-generate workflow requires two separate Syncfusion products, two license agreements, and two API surfaces — while the reading capability could have been sourced directly from the free library that OPX wraps.

Community License Cliff: Syncfusion's Community License requires four conditions to be true simultaneously and continuously: annual gross revenue below $1,000,000, five or fewer developers, ten or fewer total employees, and total outside capital raised below $3,000,000. Government organizations are ineligible regardless of size. Crossing any single condition creates an immediate commercial licensing obligation. A Series A funding round typically pushes the capital raised past $3,000,000 on the day it closes, triggering a license fee regardless of team size or revenue. The commercial transition goes from $0 to approximately $995 per developer per year at the Standard tier — and that price covers the entire Essential Studio suite, not only the barcode component.

Version-Specific Key Rotation: Syncfusion license keys are tied to specific Essential Studio version ranges. Upgrading from version 24.x to 25.x requires obtaining a new key from the account portal, updating that key in every deployment environment's secrets store, and redeploying to prevent trial watermarks from appearing in production outputs. For teams with frequent release cadences or multiple deployment targets, this rotation becomes a recurring operational overhead that is disproportionate to the underlying requirement of generating a barcode image.

The Fundamental Problem

Syncfusion's control architecture makes programmatic file generation indirect. Producing a barcode file with SfBarcode requires pre-allocating a Bitmap, calling DrawToBitmap, and then saving the bitmap — a WinForms rendering pattern that carries the Windows Forms runtime as a dependency:

// Syncfusion SfBarcode: indirect file output through DrawToBitmap
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR-VERSION-SPECIFIC-KEY");

var barcode = new SfBarcode();
barcode.Text = "SHIP-2024-001";
barcode.Symbology = BarcodeSymbolType.Code128A;
barcode.Width = 400;
barcode.Height = 150;

using var bitmap = new Bitmap(barcode.Width, barcode.Height);
barcode.DrawToBitmap(bitmap, barcode.ClientRectangle);
bitmap.Save("shipping-label.png", ImageFormat.Png);
// Reading: not possible — requires separate OPX purchase
// Syncfusion SfBarcode: indirect file output through DrawToBitmap
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR-VERSION-SPECIFIC-KEY");

var barcode = new SfBarcode();
barcode.Text = "SHIP-2024-001";
barcode.Symbology = BarcodeSymbolType.Code128A;
barcode.Width = 400;
barcode.Height = 150;

using var bitmap = new Bitmap(barcode.Width, barcode.Height);
barcode.DrawToBitmap(bitmap, barcode.ClientRectangle);
bitmap.Save("shipping-label.png", ImageFormat.Png);
// Reading: not possible — requires separate OPX purchase
Imports Syncfusion.Licensing
Imports System.Drawing
Imports System.Drawing.Imaging

' Syncfusion SfBarcode: indirect file output through DrawToBitmap
SyncfusionLicenseProvider.RegisterLicense("YOUR-VERSION-SPECIFIC-KEY")

Dim barcode As New SfBarcode()
barcode.Text = "SHIP-2024-001"
barcode.Symbology = BarcodeSymbolType.Code128A
barcode.Width = 400
barcode.Height = 150

Using bitmap As New Bitmap(barcode.Width, barcode.Height)
    barcode.DrawToBitmap(bitmap, barcode.ClientRectangle)
    bitmap.Save("shipping-label.png", ImageFormat.Png)
End Using
' Reading: not possible — requires separate OPX purchase
$vbLabelText   $csharpLabel

IronBarcode generates files directly and reads with the same package:

// IronBarcode: direct generation and reading in one package
IronBarCode.License.LicenseKey = "YOUR-KEY";

// Generate
BarcodeWriter.CreateBarcode("SHIP-2024-001", BarcodeEncoding.Code128)
    .ResizeTo(400, 150)
    .SaveAsPng("shipping-label.png");

// Read — same package, no additional product required
var results = BarcodeReader.Read("shipping-label.png");
foreach (var result in results)
    Console.WriteLine($"{result.Format}: {result.Value}");
// IronBarcode: direct generation and reading in one package
IronBarCode.License.LicenseKey = "YOUR-KEY";

// Generate
BarcodeWriter.CreateBarcode("SHIP-2024-001", BarcodeEncoding.Code128)
    .ResizeTo(400, 150)
    .SaveAsPng("shipping-label.png");

// Read — same package, no additional product required
var results = BarcodeReader.Read("shipping-label.png");
foreach (var result in results)
    Console.WriteLine($"{result.Format}: {result.Value}");
Imports IronBarCode

' IronBarcode: direct generation and reading in one package
License.LicenseKey = "YOUR-KEY"

' Generate
BarcodeWriter.CreateBarcode("SHIP-2024-001", BarcodeEncoding.Code128) _
    .ResizeTo(400, 150) _
    .SaveAsPng("shipping-label.png")

' Read — same package, no additional product required
Dim results = BarcodeReader.Read("shipping-label.png")
For Each result In results
    Console.WriteLine($"{result.Format}: {result.Value}")
Next
$vbLabelText   $csharpLabel

IronBarcode vs Syncfusion Barcode: Feature Comparison

Feature Syncfusion Barcode IronBarcode
Barcode generation Yes — UI control (WinForms, WPF, Blazor, MAUI) Yes — static API, all environments
Barcode reading No — separate Barcode Reader OPX required Yes — same package
OPX reading product wraps ZXing.Net (Apache 2.0) Yes N/A
PDF barcode output No — requires Syncfusion.Pdf additionally Yes — SaveAsPdf() built-in
PDF barcode reading No Yes — native
Server-side / headless generation Requires WinForms runtime (DrawToBitmap) Native — no UI dependency
Docker / Linux deployment Limited Full support
ASP.NET Core minimal API Not directly supported Full support
QR code with embedded logo No Yes — .AddBrandLogo()
Automatic format detection on read N/A Yes
Community / free tier Community License (four simultaneous conditions) 30-day trial (watermark only)
Commercial license model Annual subscription (Essential Studio) Perpetual from $999
License key scope Version-specific, rotates with major NuGet updates Version-stable within major release
Platform registration steps 3–4 steps (RegisterLicense + AddSyncfusionBlazor + ConfigureSyncfusionCore + razor imports) One line, all platforms
1D format range Code 128, Code 39, EAN, UPC, Codabar, and others All Syncfusion formats plus PDF417, Aztec, MaxiCode, GS1, USPS IMb, and 50+
2D format range QR Code, DataMatrix QR Code, DataMatrix, PDF417, Micro PDF417, Aztec, MaxiCode

Quick Start

Step 1: Replace NuGet Packages

Remove the Syncfusion barcode package for the platform in use. If the project targets multiple platforms, run the removal for each:

# Blazor
dotnet remove package Syncfusion.Blazor.BarcodeGenerator

# WinForms
dotnet remove package Syncfusion.Barcode.WinForms

# WPF
dotnet remove package Syncfusion.SfBarcode.WPF

# MAUI
dotnet remove package Syncfusion.Maui.Barcode
# Blazor
dotnet remove package Syncfusion.Blazor.BarcodeGenerator

# WinForms
dotnet remove package Syncfusion.Barcode.WinForms

# WPF
dotnet remove package Syncfusion.SfBarcode.WPF

# MAUI
dotnet remove package Syncfusion.Maui.Barcode
SHELL

If no other Syncfusion packages remain in the project after removing the barcode package, also remove the licensing package:

dotnet remove package Syncfusion.Licensing
dotnet remove package Syncfusion.Licensing
SHELL

Install IronBarcode — one package for all platforms:

dotnet add package IronBarcode
dotnet add package IronBarcode
SHELL

Step 2: Update Namespaces

Remove Syncfusion barcode namespaces and add the IronBarcode namespace:

// Remove these (barcode-specific; leave others if non-barcode Syncfusion controls remain)
using Syncfusion.Windows.Forms.Barcode;
using Syncfusion.Licensing;
// @using Syncfusion.Blazor.BarcodeGenerator  (in _Imports.razor)

// Add this
using IronBarCode;
// Remove these (barcode-specific; leave others if non-barcode Syncfusion controls remain)
using Syncfusion.Windows.Forms.Barcode;
using Syncfusion.Licensing;
// @using Syncfusion.Blazor.BarcodeGenerator  (in _Imports.razor)

// Add this
using IronBarCode;
Imports IronBarCode
$vbLabelText   $csharpLabel

Step 3: Initialize License

Remove the Syncfusion license registration and platform configuration from the application startup. Then add a single IronBarcode license line at the same startup location:

// Remove from Program.cs / App.xaml.cs / MauiProgram.cs:
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR-VERSION-SPECIFIC-KEY");
builder.Services.AddSyncfusionBlazor();         // Blazor only — remove if no other Syncfusion controls
builder.ConfigureSyncfusionCore();              // MAUI only — remove if no other Syncfusion controls

// Add at the same startup point:
IronBarCode.License.LicenseKey = "YOUR-KEY";
// Remove from Program.cs / App.xaml.cs / MauiProgram.cs:
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR-VERSION-SPECIFIC-KEY");
builder.Services.AddSyncfusionBlazor();         // Blazor only — remove if no other Syncfusion controls
builder.ConfigureSyncfusionCore();              // MAUI only — remove if no other Syncfusion controls

// Add at the same startup point:
IronBarCode.License.LicenseKey = "YOUR-KEY";
' Remove from Program.vb / App.xaml.vb / MauiProgram.vb:
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR-VERSION-SPECIFIC-KEY")
builder.Services.AddSyncfusionBlazor()         ' Blazor only — remove if no other Syncfusion controls
builder.ConfigureSyncfusionCore()              ' MAUI only — remove if no other Syncfusion controls

' Add at the same startup point:
IronBarCode.License.LicenseKey = "YOUR-KEY"
$vbLabelText   $csharpLabel

For CI/CD pipelines and Docker containers, store the key in an environment variable:

IronBarCode.License.LicenseKey = Environment.GetEnvironmentVariable("IRONBARCODE_LICENSE");
IronBarCode.License.LicenseKey = Environment.GetEnvironmentVariable("IRONBARCODE_LICENSE");
Imports System

IronBarCode.License.LicenseKey = Environment.GetEnvironmentVariable("IRONBARCODE_LICENSE")
$vbLabelText   $csharpLabel

Code Migration Examples

WinForms SfBarcode to BarcodeWriter

The WinForms migration eliminates the DrawToBitmap indirection and replaces it with a direct file-output chain. The Syncfusion pattern requires pre-allocating a Bitmap of known dimensions; IronBarcode computes dimensions as part of the generation call.

Syncfusion Approach:

using Syncfusion.Windows.Forms.Barcode;
using System.Drawing;
using System.Drawing.Imaging;

Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR-VERSION-SPECIFIC-KEY");

var barcode = new SfBarcode();
barcode.Text = "ORD-20240315-001";
barcode.Symbology = BarcodeSymbolType.Code128A;
barcode.BarHeight = 100;
barcode.NarrowBarWidth = 1;
barcode.ShowText = true;
barcode.Width = 400;
barcode.Height = 150;

using var bitmap = new Bitmap(barcode.Width, barcode.Height);
barcode.DrawToBitmap(bitmap, barcode.ClientRectangle);
bitmap.Save("order-label.png", ImageFormat.Png);
using Syncfusion.Windows.Forms.Barcode;
using System.Drawing;
using System.Drawing.Imaging;

Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR-VERSION-SPECIFIC-KEY");

var barcode = new SfBarcode();
barcode.Text = "ORD-20240315-001";
barcode.Symbology = BarcodeSymbolType.Code128A;
barcode.BarHeight = 100;
barcode.NarrowBarWidth = 1;
barcode.ShowText = true;
barcode.Width = 400;
barcode.Height = 150;

using var bitmap = new Bitmap(barcode.Width, barcode.Height);
barcode.DrawToBitmap(bitmap, barcode.ClientRectangle);
bitmap.Save("order-label.png", ImageFormat.Png);
Imports Syncfusion.Windows.Forms.Barcode
Imports System.Drawing
Imports System.Drawing.Imaging

Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR-VERSION-SPECIFIC-KEY")

Dim barcode As New SfBarcode()
barcode.Text = "ORD-20240315-001"
barcode.Symbology = BarcodeSymbolType.Code128A
barcode.BarHeight = 100
barcode.NarrowBarWidth = 1
barcode.ShowText = True
barcode.Width = 400
barcode.Height = 150

Using bitmap As New Bitmap(barcode.Width, barcode.Height)
    barcode.DrawToBitmap(bitmap, barcode.ClientRectangle)
    bitmap.Save("order-label.png", ImageFormat.Png)
End Using
$vbLabelText   $csharpLabel

IronBarcode Approach:

using IronBarCode;

IronBarCode.License.LicenseKey = "YOUR-KEY";

BarcodeWriter.CreateBarcode("ORD-20240315-001", BarcodeEncoding.Code128)
    .ResizeTo(400, 150)
    .AddBarcodeText()
    .SaveAsPng("order-label.png");
using IronBarCode;

IronBarCode.License.LicenseKey = "YOUR-KEY";

BarcodeWriter.CreateBarcode("ORD-20240315-001", BarcodeEncoding.Code128)
    .ResizeTo(400, 150)
    .AddBarcodeText()
    .SaveAsPng("order-label.png");
Imports IronBarCode

IronBarCode.License.LicenseKey = "YOUR-KEY"

BarcodeWriter.CreateBarcode("ORD-20240315-001", BarcodeEncoding.Code128) _
    .ResizeTo(400, 150) _
    .AddBarcodeText() _
    .SaveAsPng("order-label.png")
$vbLabelText   $csharpLabel

BarcodeSymbolType.Code128A maps to BarcodeEncoding.Code128. The DrawToBitmap + Bitmap.Save sequence collapses into .SaveAsPng(). If the barcode must be displayed inside a WinForms PictureBox rather than saved to disk, use .ToPngBinaryData() to load the image into the control. The full range of 1D barcode formats in IronBarcode extends well beyond the Syncfusion control's supported list.

Blazor SfBarcodeGenerator to Minimal API Endpoint

The Blazor migration is a structural change rather than a line-for-line substitution. SfBarcodeGenerator is a Razor component that renders in the browser through Syncfusion's JavaScript layer. IronBarcode has no Razor component; it is a server-side library. The replacement pattern is a minimal API endpoint on the server that returns barcode bytes, referenced in the Razor page as an image source.

Syncfusion Approach:

@page "/fulfillment"
@using Syncfusion.Blazor.BarcodeGenerator

<SfBarcodeGenerator
    Width="300px"
    Height="150px"
    Type="BarcodeType.Code128"
    Value="@orderNumber">
    <BarcodeGeneratorDisplayText Visibility="true"></BarcodeGeneratorDisplayText>
</SfBarcodeGenerator>

@code {
    private string orderNumber = "ORD-20240315-001";
}

IronBarcode Approach:

Add a generation endpoint in Program.cs:

using IronBarCode;

app.MapGet("/barcode/{value}", (string value) =>
{
    var bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128)
        .ResizeTo(300, 150)
        .AddBarcodeText()
        .ToPngBinaryData();

    return Results.File(bytes, "image/png");
});
using IronBarCode;

app.MapGet("/barcode/{value}", (string value) =>
{
    var bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128)
        .ResizeTo(300, 150)
        .AddBarcodeText()
        .ToPngBinaryData();

    return Results.File(bytes, "image/png");
});
Imports IronBarCode

app.MapGet("/barcode/{value}", Function(value As String)
    Dim bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128) _
        .ResizeTo(300, 150) _
        .AddBarcodeText() _
        .ToPngBinaryData()

    Return Results.File(bytes, "image/png")
End Function)
$vbLabelText   $csharpLabel

Reference the endpoint in the Razor component:

@page "/fulfillment"

<img src="/barcode/@orderNumber" alt="Order barcode: @orderNumber" />

@code {
    private string orderNumber = "ORD-20240315-001";
}

This endpoint is independently testable, reusable from any HTTP client, and compatible with Blazor Server, Blazor WebAssembly with a hosted API backend, and any other web frontend.

QR Code Generation

The Syncfusion QR component is also browser-rendered with no server-side output path. IronBarcode generates QR codes server-side with direct file output.

Syncfusion Approach:

@using Syncfusion.Blazor.BarcodeGenerator

<SfQRCodeGenerator
    Width="300px"
    Height="300px"
    Value="https://example.com/product/ABC-123">
    <QRCodeGeneratorDisplayText Visibility="false">
    </QRCodeGeneratorDisplayText>
</SfQRCodeGenerator>

IronBarcode Approach:

using IronBarCode;

// Standard QR code
QRCodeWriter.CreateQrCode("https://example.com/product/ABC-123", 300,
    QRCodeWriter.QrErrorCorrectionLevel.High)
    .SaveAsPng("product-qr.png");

// QR code with embedded brand logo — not available in Syncfusion
QRCodeWriter.CreateQrCode("https://example.com/product/ABC-123", 500,
    QRCodeWriter.QrErrorCorrectionLevel.Highest)
    .AddBrandLogo("company-logo.png")
    .SaveAsPng("product-qr-branded.png");
using IronBarCode;

// Standard QR code
QRCodeWriter.CreateQrCode("https://example.com/product/ABC-123", 300,
    QRCodeWriter.QrErrorCorrectionLevel.High)
    .SaveAsPng("product-qr.png");

// QR code with embedded brand logo — not available in Syncfusion
QRCodeWriter.CreateQrCode("https://example.com/product/ABC-123", 500,
    QRCodeWriter.QrErrorCorrectionLevel.Highest)
    .AddBrandLogo("company-logo.png")
    .SaveAsPng("product-qr-branded.png");
Imports IronBarCode

' Standard QR code
QRCodeWriter.CreateQrCode("https://example.com/product/ABC-123", 300, QRCodeWriter.QrErrorCorrectionLevel.High) _
    .SaveAsPng("product-qr.png")

' QR code with embedded brand logo — not available in Syncfusion
QRCodeWriter.CreateQrCode("https://example.com/product/ABC-123", 500, QRCodeWriter.QrErrorCorrectionLevel.Highest) _
    .AddBrandLogo("company-logo.png") _
    .SaveAsPng("product-qr-branded.png")
$vbLabelText   $csharpLabel

OPX Reading Replacement

If the project used Barcode Reader OPX — or deferred a reading requirement to a future OPX purchase — IronBarcode replaces that dependency with the package already installed. No secondary product, no second license.

Syncfusion Approach (Barcode Reader OPX):

// Requires separate Syncfusion Barcode Reader OPX purchase
// OPX wraps ZXing.Net internally (Apache 2.0 — free to use directly)
using Syncfusion.BarcodeReader;

var reader = new BarcodeReader();
var results = reader.ReadBarcodes("warehouse-scan.png");
foreach (var result in results)
    Console.WriteLine($"Value: {result.Value}");
// Requires separate Syncfusion Barcode Reader OPX purchase
// OPX wraps ZXing.Net internally (Apache 2.0 — free to use directly)
using Syncfusion.BarcodeReader;

var reader = new BarcodeReader();
var results = reader.ReadBarcodes("warehouse-scan.png");
foreach (var result in results)
    Console.WriteLine($"Value: {result.Value}");
Imports Syncfusion.BarcodeReader

Dim reader As New BarcodeReader()
Dim results = reader.ReadBarcodes("warehouse-scan.png")
For Each result In results
    Console.WriteLine($"Value: {result.Value}")
Next
$vbLabelText   $csharpLabel

IronBarcode Approach:

using IronBarCode;

// Included in the same NuGet package as generation — no second product required
var results = BarcodeReader.Read("warehouse-scan.png");
foreach (var result in results)
{
    Console.WriteLine($"Format: {result.Format}");
    Console.WriteLine($"Value: {result.Value}");
    Console.WriteLine($"Confidence: {result.Confidence}%");
}
using IronBarCode;

// Included in the same NuGet package as generation — no second product required
var results = BarcodeReader.Read("warehouse-scan.png");
foreach (var result in results)
{
    Console.WriteLine($"Format: {result.Format}");
    Console.WriteLine($"Value: {result.Value}");
    Console.WriteLine($"Confidence: {result.Confidence}%");
}
Imports IronBarCode

' Included in the same NuGet package as generation — no second product required
Dim results = BarcodeReader.Read("warehouse-scan.png")
For Each result In results
    Console.WriteLine($"Format: {result.Format}")
    Console.WriteLine($"Value: {result.Value}")
    Console.WriteLine($"Confidence: {result.Confidence}%")
Next
$vbLabelText   $csharpLabel

The barcode reading documentation covers reading from byte arrays for upload handlers, speed-versus-accuracy tuning, and multi-barcode detection.

PDF Barcode Generation

Syncfusion barcode controls have no PDF output path. IronBarcode treats PDF as a first-class output format.

Syncfusion Approach:

// No direct path — requires combining Syncfusion.Barcode.WinForms and Syncfusion.Pdf
// Step 1: Generate to Bitmap via DrawToBitmap
// Step 2: Load Syncfusion PDF document
// Step 3: Insert bitmap as image element
// Two packages, two APIs, two license obligations
// No direct path — requires combining Syncfusion.Barcode.WinForms and Syncfusion.Pdf
// Step 1: Generate to Bitmap via DrawToBitmap
// Step 2: Load Syncfusion PDF document
// Step 3: Insert bitmap as image element
// Two packages, two APIs, two license obligations
' No direct path — requires combining Syncfusion.Barcode.WinForms and Syncfusion.Pdf
' Step 1: Generate to Bitmap via DrawToBitmap
' Step 2: Load Syncfusion PDF document
' Step 3: Insert bitmap as image element
' Two packages, two APIs, two license obligations
$vbLabelText   $csharpLabel

IronBarcode Approach:

using IronBarCode;

// Generate directly to PDF — no secondary library required
BarcodeWriter.CreateBarcode("PALLET-2024-0891", BarcodeEncoding.Code128)
    .ResizeTo(400, 150)
    .SaveAsPdf("pallet-label.pdf");

// Read barcodes from an existing PDF
var pdfResults = BarcodeReader.Read("shipping-manifest.pdf");
foreach (var result in pdfResults)
    Console.WriteLine($"Page {result.PageNumber}: {result.Value}");
using IronBarCode;

// Generate directly to PDF — no secondary library required
BarcodeWriter.CreateBarcode("PALLET-2024-0891", BarcodeEncoding.Code128)
    .ResizeTo(400, 150)
    .SaveAsPdf("pallet-label.pdf");

// Read barcodes from an existing PDF
var pdfResults = BarcodeReader.Read("shipping-manifest.pdf");
foreach (var result in pdfResults)
    Console.WriteLine($"Page {result.PageNumber}: {result.Value}");
Imports IronBarCode

' Generate directly to PDF — no secondary library required
BarcodeWriter.CreateBarcode("PALLET-2024-0891", BarcodeEncoding.Code128) _
    .ResizeTo(400, 150) _
    .SaveAsPdf("pallet-label.pdf")

' Read barcodes from an existing PDF
Dim pdfResults = BarcodeReader.Read("shipping-manifest.pdf")
For Each result In pdfResults
    Console.WriteLine($"Page {result.PageNumber}: {result.Value}")
Next
$vbLabelText   $csharpLabel

The barcode PDF generation guide covers multi-page PDF outputs and embedding barcodes alongside other document content.

Syncfusion Barcode API to IronBarcode Mapping Reference

Syncfusion IronBarcode
SyncfusionLicenseProvider.RegisterLicense("KEY") IronBarCode.License.LicenseKey = "key"
builder.Services.AddSyncfusionBlazor() Not required
builder.ConfigureSyncfusionCore() Not required
new SfBarcode() BarcodeWriter.CreateBarcode() (static)
barcode.Text = "value" First parameter of CreateBarcode()
barcode.Symbology = BarcodeSymbolType.Code128A BarcodeEncoding.Code128
barcode.Symbology = BarcodeSymbolType.QRBarcode QRCodeWriter.CreateQrCode()
barcode.BarHeight = 100 .ResizeTo(width, 100)
barcode.ShowText = true .AddBarcodeText()
barcode.DrawToBitmap(bitmap, rect) .SaveAsPng(path)
Manual BitmapMemoryStream .ToPngBinaryData()
<SfBarcodeGenerator Type="BarcodeType.Code128" Value="..."> BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128) in API endpoint
<SfQRCodeGenerator Value="..."> QRCodeWriter.CreateQrCode(value, size) in API endpoint
BarcodeType.Code128 (Blazor enum) BarcodeEncoding.Code128
Barcode Reader OPX (separate product, wraps ZXing.Net) BarcodeReader.Read(path) — native, same package
No reading API in control BarcodeReader.Read(path)
No PDF output in control .SaveAsPdf(path)
No PDF reading BarcodeReader.Read("document.pdf")

Common Migration Issues and Solutions

Issue 1: Trial Watermarks After NuGet Update

Syncfusion: Upgrading from Essential Studio 24.x to 25.x invalidates the existing license key. Any output generated before updating the secrets store will display a trial watermark. This is a silent failure — the application continues to run but produces non-compliant output.

Solution: After updating the IronBarcode NuGet package, the license key does not change within a major version. No secrets update or redeployment is needed for minor or patch releases. When upgrading to a new major version, update the key once at the application entry point:

IronBarCode.License.LicenseKey = "YOUR-UPDATED-KEY";
IronBarCode.License.LicenseKey = "YOUR-UPDATED-KEY";
Imports IronBarCode

IronBarCode.License.LicenseKey = "YOUR-UPDATED-KEY"
$vbLabelText   $csharpLabel

Issue 2: DrawToBitmap Fails in Headless Environments

Syncfusion: SfBarcode.DrawToBitmap depends on the Windows Forms rendering pipeline. In an ASP.NET Core process, Azure Function, or Linux Docker container, calling DrawToBitmap will throw InvalidOperationException or produce a blank bitmap because no Windows Forms message loop is present.

Solution: Replace with BarcodeWriter.CreateBarcode(). IronBarcode performs generation in managed code without any UI runtime dependency:

// Works in ASP.NET Core, Azure Functions, Docker on Linux, console apps
var bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128)
    .ResizeTo(400, 150)
    .ToPngBinaryData();
// Works in ASP.NET Core, Azure Functions, Docker on Linux, console apps
var bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128)
    .ResizeTo(400, 150)
    .ToPngBinaryData();
' Works in ASP.NET Core, Azure Functions, Docker on Linux, console apps
Dim bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128) _
    .ResizeTo(400, 150) _
    .ToPngBinaryData()
$vbLabelText   $csharpLabel

Issue 3: SfBarcodeGenerator Has No Server-Side Output

Syncfusion: SfBarcodeGenerator is a Razor component with no server-side API surface. Attempts to use it in a controller action or background service will find no applicable method for generating barcode bytes.

Solution: Create a minimal API endpoint that generates the barcode server-side and returns it as an HTTP response. Reference the endpoint from the Razor component via an <img src="..."> tag:

app.MapGet("/barcode/{value}", (string value) =>
{
    var bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128)
        .ResizeTo(300, 150)
        .ToPngBinaryData();
    return Results.File(bytes, "image/png");
});
app.MapGet("/barcode/{value}", (string value) =>
{
    var bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128)
        .ResizeTo(300, 150)
        .ToPngBinaryData();
    return Results.File(bytes, "image/png");
});
Imports Microsoft.AspNetCore.Builder
Imports Microsoft.AspNetCore.Http

app.MapGet("/barcode/{value}", Function(value As String)
                                   Dim bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128) _
                                       .ResizeTo(300, 150) _
                                       .ToPngBinaryData()
                                   Return Results.File(bytes, "image/png")
                               End Function)
$vbLabelText   $csharpLabel

Issue 4: Missing Reading Capability (OPX Not Purchased)

Syncfusion: Projects that deferred barcode reading because OPX was not yet purchased have no reading code to migrate. Adding reading capability from scratch requires OPX procurement, integration, and a new license agreement.

Solution: IronBarcode reading is included in the same package. No procurement or second license is needed. Add BarcodeReader.Read(path) wherever reading is required:

var results = BarcodeReader.Read("incoming-scan.png");
var results = BarcodeReader.Read("incoming-scan.png");
Dim results = BarcodeReader.Read("incoming-scan.png")
$vbLabelText   $csharpLabel

Issue 5: Community License Expiry During Migration

Syncfusion: A team using the Community License that crosses any eligibility threshold during the migration window — including closing a funding round — may find that the Syncfusion controls stop producing valid output before migration is complete.

Solution: IronBarcode's 30-day trial allows full evaluation without revenue, headcount, or capital conditions. The trial watermark appears on generated output; activating a purchased license key removes it. There are no organizational size thresholds in the IronBarcode licensing model.

Syncfusion Barcode Migration Checklist

Pre-Migration Tasks

Audit the codebase to locate every file that references Syncfusion barcode:

grep -r "SyncfusionLicenseProvider.RegisterLicense\|AddSyncfusionBlazor\|ConfigureSyncfusionCore" --include="*.cs" .
grep -r "new SfBarcode\(\)\|SfBarcodeGenerator\|SfQRCodeGenerator" --include="*.cs" --include="*.razor" .
grep -r "BarcodeSymbolType\.\|BarcodeType\." --include="*.cs" --include="*.razor" .
grep -r "DrawToBitmap\|barcode\.Text\s*=" --include="*.cs" .
grep -r "Syncfusion\.Barcode\|Syncfusion\.Blazor\.BarcodeGenerator" --include="*.csproj" .
grep -r "SyncfusionLicenseProvider.RegisterLicense\|AddSyncfusionBlazor\|ConfigureSyncfusionCore" --include="*.cs" .
grep -r "new SfBarcode\(\)\|SfBarcodeGenerator\|SfQRCodeGenerator" --include="*.cs" --include="*.razor" .
grep -r "BarcodeSymbolType\.\|BarcodeType\." --include="*.cs" --include="*.razor" .
grep -r "DrawToBitmap\|barcode\.Text\s*=" --include="*.cs" .
grep -r "Syncfusion\.Barcode\|Syncfusion\.Blazor\.BarcodeGenerator" --include="*.csproj" .
SHELL

Document the following before writing any migration code:

  • List every file that calls SyncfusionLicenseProvider.RegisterLicense
  • List every SfBarcode instantiation and its property assignments
  • List every <SfBarcodeGenerator> and <SfQRCodeGenerator> Razor component usage
  • List every DrawToBitmap call and the downstream save or display path
  • Confirm whether Barcode Reader OPX is installed; if so, list every reading call

Code Update Tasks

  1. Remove Syncfusion barcode NuGet package(s) for each platform in the project
  2. Remove Syncfusion.Licensing NuGet package if no other Syncfusion controls remain
  3. Install IronBarcode NuGet package
  4. Replace SyncfusionLicenseProvider.RegisterLicense("KEY") with IronBarCode.License.LicenseKey = "KEY" at the application entry point
  5. Remove builder.Services.AddSyncfusionBlazor() if no other Syncfusion controls remain
  6. Remove builder.ConfigureSyncfusionCore() if no other Syncfusion controls remain
  7. Remove @using Syncfusion.Blazor and @using Syncfusion.Blazor.BarcodeGenerator from _Imports.razor if applicable
  8. Replace using Syncfusion.Windows.Forms.Barcode and using Syncfusion.Licensing with using IronBarCode
  9. Replace each new SfBarcode() + property assignments + DrawToBitmap block with BarcodeWriter.CreateBarcode(value, BarcodeEncoding.X).ResizeTo(w, h).SaveAsPng(path)
  10. Replace BarcodeSymbolType.Code128A (and equivalent) with BarcodeEncoding.Code128
  11. Replace BarcodeType.Code128 (Blazor enum) with BarcodeEncoding.Code128
  12. Replace each <SfBarcodeGenerator> Razor component with a minimal API endpoint and an <img src="..."> reference in the component
  13. Replace each <SfQRCodeGenerator> Razor component with a QRCodeWriter.CreateQrCode() endpoint and an <img src="..."> reference
  14. Replace all Barcode Reader OPX reading calls with BarcodeReader.Read(path)
  15. Add BarcodeReader.Read(path) wherever reading capability was previously absent due to OPX not being purchased

Post-Migration Testing

  • Verify that generated barcode images are scan-valid using a hardware scanner or a reference reader application
  • Verify that no trial watermarks appear on generated output after license key activation
  • Confirm that BarcodeReader.Read() returns the expected value and format for each barcode type in use
  • Test PDF output with .SaveAsPdf() to confirm page dimensions and barcode dimensions match design requirements
  • Test the Blazor minimal API endpoint directly (via browser or HTTP client) before testing within the Razor component
  • Confirm Docker and Linux deployment produces identical output to Windows development machines
  • Run a final grep audit to confirm no remaining references to SfBarcode, SfBarcodeGenerator, DrawToBitmap, BarcodeSymbolType, or SyncfusionLicenseProvider

Key Benefits of Migrating to IronBarcode

Unified Generation and Reading: After migration, both generation and reading operate through a single NuGet package under one license. There is no secondary product to purchase, no second API surface to learn, and no ZXing.Net wrapper dependency consuming a license budget that could instead go to the direct open-source library.

Elimination of Version-Specific Key Rotation: IronBarcode license keys remain valid across minor and patch updates within a major release. The operational overhead of obtaining a new key, updating secrets in every deployment environment, and redeploying to clear trial watermarks on every major NuGet version update is eliminated entirely.

Platform-Independent Deployment: The same IronBarcode package and the same generation API work in WinForms desktop, ASP.NET Core services, Azure Functions, console applications, and Linux Docker containers. The Windows Forms runtime dependency introduced by DrawToBitmap is removed, and Blazor deployments shift from browser-rendered components to server-side API endpoints that are independently testable and client-agnostic.

Native PDF Support: Generation and reading both extend to PDF natively. Producing a barcode PDF no longer requires coordinating two Syncfusion products; reading barcodes from PDF manifests and shipping documents no longer requires a separate PDF extraction step.

Predictable License Economics: IronBarcode's perpetual license model does not impose revenue, headcount, employee count, or capital thresholds. Teams that have grown past the Syncfusion Community License eligibility conditions — or that anticipate doing so — move to a licensing model where organizational growth does not create a compliance event.

Please noteSyncfusion and ZXing.NET are registered trademarks of their respective owners. This site is not affiliated with, endorsed by, or sponsored by Syncfusion or ZXing.NET. All product names, logos, and brands are property of their respective owners. Comparisons are for informational purposes only and reflect publicly available information at the time of writing.

Frequently Asked Questions

Why should I migrate from Syncfusion Barcode to IronBarcode?

Common reasons include simplifying licensing (removing SDK + runtime key complexity), eliminating throughput limits, gaining native PDF support, improving Docker/CI/CD deployment, and reducing API boilerplate in production code.

How do I replace Syncfusion API calls with IronBarcode?

Replace instance creation and licensing boilerplate with IronBarCode.License.LicenseKey = "key". Replace reader calls with BarcodeReader.Read(path) and writer calls with BarcodeWriter.CreateBarcode(data, encoding). Static methods require no instance management.

How much code changes when migrating from Syncfusion Barcode to IronBarcode?

Most migrations result in fewer lines of code. Licensing boilerplate, instance constructors, and explicit format configuration are removed. Core read/write operations map to shorter IronBarcode equivalents with cleaner result objects.

Do I need to keep both Syncfusion Barcode and IronBarcode installed during migration?

No. Most migrations are direct replacements rather than parallel operation. Migrate one service class at a time, replace the NuGet reference, and update the instantiation and API call patterns before moving to the next class.

What is the NuGet package name for IronBarcode?

The package is 'IronBarCode' (with capital B and C). Install it with 'Install-Package IronBarCode' or 'dotnet add package IronBarCode'. The using directive in code is 'using IronBarCode;'.

How does IronBarcode simplify Docker deployment compared to Syncfusion Barcode?

IronBarcode is a NuGet package with no external SDK files or mounted license configuration. In Docker, set the IRONBARCODE_LICENSE_KEY environment variable and the package handles license validation at startup.

Does IronBarcode detect all barcode formats automatically after migrating from Syncfusion?

Yes. IronBarcode auto-detects symbology across all supported formats. Explicit BarcodeTypes enumeration is not required. If format is already known and performance matters, BarcodeReaderOptions allows restricting the search space as an optimization.

Can IronBarcode read barcodes from PDFs without a separate library?

Yes. BarcodeReader.Read("document.pdf") processes PDF files natively. Results include PageNumber, Format, Value, and Confidence for each barcode found. No external PDF rendering step is required.

How does IronBarcode handle parallel barcode processing?

IronBarcode's static methods are stateless and thread-safe. Use Parallel.ForEach directly over file lists without per-thread instance management. BarcodeReaderOptions.MaxParallelThreads controls the internal thread budget.

What result properties change when migrating from Syncfusion Barcode to IronBarcode?

Common renames: BarcodeValue becomes Value, BarcodeType becomes Format. IronBarcode results also add Confidence and PageNumber. A solution-wide search-and-replace handles the renames in existing result-processing code.

How do I set up IronBarcode licensing in a CI/CD pipeline?

Store IRONBARCODE_LICENSE_KEY as a pipeline secret and assign IronBarCode.License.LicenseKey in application startup code. One secret covers all environments including development, test, staging, and production.

Does IronBarcode support QR code generation with custom styling?

Yes. QRCodeWriter.CreateQrCode() supports custom colors via ChangeBarCodeColor(), logo embedding via AddBrandLogo(), configurable error correction levels, and multiple output formats including PNG, JPG, PDF, and stream.

Jordi Bardia
Software Engineer
Jordi is most proficient in Python, C# and C++, when he isn’t leveraging his skills at Iron Software; he’s game programming. Sharing responsibilities for product testing, product development and research, Jordi adds immense value to continual product improvement. The varied experience keeps him challenged and engaged, and he ...
Read More

Iron Support Team

We're online 24 hours, 5 days a week.
Chat
Email
Call Me