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 a per-developer annual Essential Studio subscription - and that subscription covers the entire suite, not only the barcode component. Syncfusion's published path is a custom quote from sales.
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 purchaseImports 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 purchaseIronBarcode generates files directly and reads with the same package:
// IronBarcode: direct generation and reading in one package
IronBarCode.License.LicenseKey = "YOUR-LICENSE-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-LICENSE-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}")
NextIronBarcode 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 (one-time, see ironsoftware.com/csharp/barcode/licensing) |
| 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.SfBarcode.Windows
# WPF
dotnet remove package Syncfusion.SfBarcode.WPF
# MAUI
dotnet remove package Syncfusion.Maui.Barcode
If no other Syncfusion packages remain in the project after removing the barcode package, also remove the licensing package:
dotnet remove package Syncfusion.Licensing
Install IronBarcode - one package for all platforms:
dotnet add package IronBarcode
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;Imports IronBarCodeStep 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-LICENSE-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-LICENSE-KEY"For CI/CD pipelines and Docker containers, store the key in an environment variable:
IronBarCode.License.LicenseKey = Environment.GetEnvironmentVariable("IRONBARCODE_LICENSE");Imports System
IronBarCode.License.LicenseKey = Environment.GetEnvironmentVariable("IRONBARCODE_LICENSE")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);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 UsingIronBarcode Approach:
using IronBarCode;
IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY";
BarcodeWriter.CreateBarcode("ORD-20240315-001", BarcodeEncoding.Code128)
.ResizeTo(400, 150)
.AddBarcodeText()
.SaveAsPng("order-label.png");Imports IronBarCode
IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY"
BarcodeWriter.CreateBarcode("ORD-20240315-001", BarcodeEncoding.Code128) _
.ResizeTo(400, 150) _
.AddBarcodeText() _
.SaveAsPng("order-label.png")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");
});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)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");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")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}");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}")
NextIronBarcode 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}%");
}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}%")
NextThe 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 obligationsIronBarcode 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}");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}")
NextThe 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 Bitmap → MemoryStream | .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-LICENSE-KEY";Imports IronBarCode
IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY"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
Dim bytes = BarcodeWriter.CreateBarcode(value, BarcodeEncoding.Code128) _
.ResizeTo(400, 150) _
.ToPngBinaryData()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");
});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)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");Dim results = BarcodeReader.Read("incoming-scan.png")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" .
Document the following before writing any migration code:
- List every file that calls
SyncfusionLicenseProvider.RegisterLicense - List every
SfBarcodeinstantiation and its property assignments - List every
<SfBarcodeGenerator>and<SfQRCodeGenerator>Razor component usage - List every
DrawToBitmapcall and the downstream save or display path - Confirm whether Barcode Reader OPX is installed; if so, list every reading call
Code Update Tasks
- Remove Syncfusion barcode NuGet package(s) for each platform in the project
- Remove
Syncfusion.LicensingNuGet package if no other Syncfusion controls remain - Install
IronBarcodeNuGet package - Replace
SyncfusionLicenseProvider.RegisterLicense("KEY")withIronBarCode.License.LicenseKey = "KEY"at the application entry point - Remove
builder.Services.AddSyncfusionBlazor()if no other Syncfusion controls remain - Remove
builder.ConfigureSyncfusionCore()if no other Syncfusion controls remain - Remove
@using Syncfusion.Blazorand@using Syncfusion.Blazor.BarcodeGeneratorfrom_Imports.razorif applicable - Replace
using Syncfusion.Windows.Forms.Barcodeandusing Syncfusion.Licensingwithusing IronBarCode - Replace each
new SfBarcode()+ property assignments +DrawToBitmapblock withBarcodeWriter.CreateBarcode(value, BarcodeEncoding.X).ResizeTo(w, h).SaveAsPng(path) - Replace
BarcodeSymbolType.Code128A(and equivalent) withBarcodeEncoding.Code128 - Replace
BarcodeType.Code128(Blazor enum) withBarcodeEncoding.Code128 - Replace each
<SfBarcodeGenerator>Razor component with a minimal API endpoint and an<img src="...">reference in the component - Replace each
<SfQRCodeGenerator>Razor component with aQRCodeWriter.CreateQrCode()endpoint and an<img src="...">reference - Replace all Barcode Reader OPX reading calls with
BarcodeReader.Read(path) - 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
grepaudit to confirm no remaining references toSfBarcode,SfBarcodeGenerator,DrawToBitmap,BarcodeSymbolType, orSyncfusionLicenseProvider
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.

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.