跳至頁尾內容
與其他組件的比較

IronBarcode與QrCoder C#的比較

IronBarcode 為 C# 開發者提供了最佳的功能、易用性和平臺跨支持性,支援50多種條碼格式,具有生成和讀取能力,而像是ZXing.Net(免費/開源)或Dynamsoft(高性能掃描)這樣的替代方案適合於特定的使用案例。

從零售到醫療行業,條碼在跨行業的資料傳輸中仍是必不可少的。 它們提供高效的機器可讀儲存,簡化操作並減少錯誤。 無論是處理QR碼、UPC-A或資料矩陣格式,您的應用需要可靠的條碼功能。

一個現代的C#條碼庫為您的.NET應用揭示這一能力。 最佳的程式庫可讓您生成條碼,從圖像文件或PDF中讀取它們,並同時處理多個條碼。 先進的工具提供自動圖像校正、批量掃描及直接嵌入到多頁文件中

本指南比較了五種廣泛使用的.NET條碼庫:IronBarcode、ZXing.Net、Aspose.BarcodeLib,和Dynamsoft Barcode Reader。 您將會了解它們的支援格式、易用性、準確性基準和成本,以便確定哪個選項最適合您的.NET項目。

為何選擇 IronBarcode 作為整體最佳選擇?

IronBarcode for .NET 首頁顯示 C# 條碼讀取和生成的程式碼範例,下載統計和框架支持詳情

IronBarcode 來自 Iron Software,為.NET開發者提供完整的條碼功能。 該庫支持超過50種條碼型別,包括線性條碼(UPC、EAN、Code128)和2D格式如 QR碼、資料矩陣和 PDF417。與單一用途的庫不同,IronBarcode 在條碼生成和識別方面都表現出色。

實施出色地處理真實世界的掃描挑戰。 通過圖像預處理過濾器,損壞或列印不良的條碼在生產場景下獲得 98% 以上的成功率。 該庫自動應用銳化和對比度調整以提高可讀性,並透過其 AutoRotate 特性來解決方向問題。 您的高效倉庫應用每分鐘處理1000多個條碼可以使用讀取速度選項來平衡準確性與性能。

// Configure for high-speed scanning with image correction
using IronBarCode;

var barcodeReaderOptions = new BarcodeReaderOptions
{
    Speed = ReadingSpeed.Faster,
    ExpectMultipleBarcodes = true,
    AutoRotate = true,
    ImageFilters = new[] { 
        ImageFilterType.SharpenFilter,
        ImageFilterType.ContrastFilter
    }
};

// Read from damaged barcode image
var results = BarcodeReader.Read("warehouse-scan.jpg", barcodeReaderOptions);
foreach (var barcode in results)
{
    Console.WriteLine($"Type: {barcode.BarcodeType}, Value: {barcode.Value}");
}
// Configure for high-speed scanning with image correction
using IronBarCode;

var barcodeReaderOptions = new BarcodeReaderOptions
{
    Speed = ReadingSpeed.Faster,
    ExpectMultipleBarcodes = true,
    AutoRotate = true,
    ImageFilters = new[] { 
        ImageFilterType.SharpenFilter,
        ImageFilterType.ContrastFilter
    }
};

// Read from damaged barcode image
var results = BarcodeReader.Read("warehouse-scan.jpg", barcodeReaderOptions);
foreach (var barcode in results)
{
    Console.WriteLine($"Type: {barcode.BarcodeType}, Value: {barcode.Value}");
}
Imports IronBarCode

' Configure for high-speed scanning with image correction
Dim barcodeReaderOptions As New BarcodeReaderOptions With {
    .Speed = ReadingSpeed.Faster,
    .ExpectMultipleBarcodes = True,
    .AutoRotate = True,
    .ImageFilters = New ImageFilterType() {
        ImageFilterType.SharpenFilter,
        ImageFilterType.ContrastFilter
    }
}

' Read from damaged barcode image
Dim results = BarcodeReader.Read("warehouse-scan.jpg", barcodeReaderOptions)
For Each barcode In results
    Console.WriteLine($"Type: {barcode.BarcodeType}, Value: {barcode.Value}")
Next
$vbLabelText   $csharpLabel

該庫的容錯功能可在挑戰環境下確保可靠讀取。 在處理多頁 TIFF 或 GIF 文件時,IronBarcode 自動處理所有幀而無需手動分離。 企業部署受益於完整的安全措施,包括 DigiCert 認證和篡改保護。

該庫可直接與PDF 文件一起工作,讓您可以在現有文件中寫入條碼或檢測條碼。 IronBarcode的讀取引擎透過使用類似旋轉、去斜和增強的校正,來自動處理不完整的掃描。 此方法在現實世界的條件下提供快速、準確的掃描。 您可以在多種格式中生成條碼圖片或將它們插入到HTML 文件多頁 PDF中。

對於生成能力,IronBarcode提供廣泛的定制選項。 您可以透過自定義顏色來設計條碼設置邊距及在 QR 碼中新增標誌。 該程式庫支持Unicode 編碼來處理國際字元。 您的應用可以在多種格式中節省條碼作為流導出,以用於網路 API 和雲服務。 當從資料來源建立條碼時,該庫無縫管理文字、URL、ID和二進制資料。

// Generate customized QR code with logo
var qrCode = QRCodeWriter.CreateQrCodeWithLogo("___PROTECTED_URL_176___", "logo.png", 300);
qrCode.ChangeBarCodeColor(System.Drawing.Color.Navy)
      .SetMargins(10)
      .SaveAsImage("branded-qr.png");

// Create styled barcode with annotations
var styledBarcode = BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeWriterEncoding.Code128);
styledBarcode.ResizeTo(400, 150)
             .SetMargins(20)
             .ChangeBarCodeColor(Color.DarkBlue)
             .AddAnnotationTextAboveBarcode("Product SKU")
             .SaveAsImage("styled-product-barcode.png");
// Generate customized QR code with logo
var qrCode = QRCodeWriter.CreateQrCodeWithLogo("___PROTECTED_URL_176___", "logo.png", 300);
qrCode.ChangeBarCodeColor(System.Drawing.Color.Navy)
      .SetMargins(10)
      .SaveAsImage("branded-qr.png");

// Create styled barcode with annotations
var styledBarcode = BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeWriterEncoding.Code128);
styledBarcode.ResizeTo(400, 150)
             .SetMargins(20)
             .ChangeBarCodeColor(Color.DarkBlue)
             .AddAnnotationTextAboveBarcode("Product SKU")
             .SaveAsImage("styled-product-barcode.png");
' Generate customized QR code with logo
Dim qrCode = QRCodeWriter.CreateQrCodeWithLogo("___PROTECTED_URL_176___", "logo.png", 300)
qrCode.ChangeBarCodeColor(System.Drawing.Color.Navy) _
      .SetMargins(10) _
      .SaveAsImage("branded-qr.png")

' Create styled barcode with annotations
Dim styledBarcode = BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeWriterEncoding.Code128)
styledBarcode.ResizeTo(400, 150) _
             .SetMargins(20) _
             .ChangeBarCodeColor(Color.DarkBlue) _
             .AddAnnotationTextAboveBarcode("Product SKU") _
             .SaveAsImage("styled-product-barcode.png")
$vbLabelText   $csharpLabel

IronBarcode 確保與.NET Framework、.NET Core、.NET Standard 及.NET MAUI跨平臺相容性。 您的 Visual Studio 項目在網頁、桌面、雲端或移動平臺上運行。 The library supports deployment on Linux, macOS, Docker containers, Azure, and AWS Lambda. 通過NuGet程式包管理器安裝十分簡便,官方的API參考包含清晰的程式碼範例,用於QR碼生成,QR碼寫入和掃描。

在處理System.Drawing 物件時,IronBarcode透過IronDrawing提供跨平臺相容性。 輸出資料格式包括有關偵測到的條碼的完整元資料,包括座標、尺寸和信心分數。 高性能場景中,通過異步和多執行緒操作可同時處理數千條碼。

為什麼跨平臺支持對您的初創公司很重要?

創業公司需要哪些許可成本?

  • 生產使用需要付費許可證,起價$999,提供許可擴展

  • 如需進階功能,可從故障排除指南中獲得最佳配置設置的受益。

為什麼為開源專案選擇 ZXing.Net?

ZXing.Net GitHub 專案頁面顯示版本 0.16.10,包含專案標誌和描述 .NET 條碼讀取和生成庫

ZXing.Net 提供了 Zebra Crossing (ZXing) 開源庫的 .NET 移植版。 此免費解決方案支持常見條碼格式,如 QR 碼、UPC-A 和 Code128。對於需要基本條碼建立或讀取的小型專案,ZXing.Net 提供輕便選項。 條碼快速入門指南展示了現代庫如何簡化這些任務。

與商業替代方案相比,該庫的格式支持仍然有限。 它處理標準的1D格式和熱門的2D程式碼,但缺乏像 GS1 DataBar之類的新格式或特殊工業程式碼。 性能基準顯示ZXing.Net每分鐘能處理100-200個條碼,這可能不足以滿足需要提高讀取速度的大量應用。 考慮配置可調的速度選項的庫,以平衡準確性和吞吐量。

// Basic ZXing.Net barcode reading
using ZXing;

var reader = new BarcodeReader();
var result = reader.Decode(new Bitmap("barcode.png"));
if (result != null)
{
    Console.WriteLine($"Decoded: {result.Text}");
}

// ZXing.Net QR code generation
var writer = new BarcodeWriter
{
    Format = BarcodeFormat.QR_CODE,
    Options = new QrCodeEncodingOptions
    {
        Width = 300,
        Height = 300,
        Margin = 2
    }
};
var bitmap = writer.Write("___PROTECTED_URL_177___");
bitmap.Save("qr-code.png");
// Basic ZXing.Net barcode reading
using ZXing;

var reader = new BarcodeReader();
var result = reader.Decode(new Bitmap("barcode.png"));
if (result != null)
{
    Console.WriteLine($"Decoded: {result.Text}");
}

// ZXing.Net QR code generation
var writer = new BarcodeWriter
{
    Format = BarcodeFormat.QR_CODE,
    Options = new QrCodeEncodingOptions
    {
        Width = 300,
        Height = 300,
        Margin = 2
    }
};
var bitmap = writer.Write("___PROTECTED_URL_177___");
bitmap.Save("qr-code.png");
Imports ZXing
Imports ZXing.QrCode

Dim reader As New BarcodeReader()
Dim result = reader.Decode(New Bitmap("barcode.png"))
If result IsNot Nothing Then
    Console.WriteLine($"Decoded: {result.Text}")
End If

Dim writer As New BarcodeWriter With {
    .Format = BarcodeFormat.QR_CODE,
    .Options = New QrCodeEncodingOptions With {
        .Width = 300,
        .Height = 300,
        .Margin = 2
    }
}
Dim bitmap = writer.Write("___PROTECTED_URL_177___")
bitmap.Save("qr-code.png")
$vbLabelText   $csharpLabel

然而,它缺乏現代功能。 條碼寫入API仍然基本,且該庫不提供自動處理編碼錯誤或圖像校正。 在不完美的掃描、旋轉程式碼或光源不佳的情況下,您可能會面臨準確性問題。 對受損條碼的測試顯示,未經手動預處理的情況下成功率為60-70%。 為取得更好結果,考慮具備內建圖像濾鏡自動旋轉功能的庫。 缺乏錯誤校正配置限制了在挑戰環境中的有效性。

什麼時候開源對MVP有意義?

  • Apache 2.0 許可的免費和開源。

  • 支持受歡迎的格式,包括 QR 碼和1D 格式

  • 對小型 .NET 項目來說,NuGet 安裝很簡單。

  • 相比高級安裝,它的依賴項很少。

您應期待什麼技術債務?

什麼時候該使用 Aspose.BarCode

Aspose.BarCode for .NET 頁面顯示條碼生成和識別 API,內含生成 QR 碼的 C# 程式碼樣本

Aspose.BarCode for .NET 針對企業使用案例,具備生成和識別能力。 它支持大多數條碼型別,並與 Aspose 套件整合,可嵌入條碼到 Word、Excel 或 PDF 文件中。 若需類似功能,IronBarcode 的 PDF 整合提供較簡單的 API。該庫可在PDF上打上條碼,位置精確。

該庫提供完整的格式支持,包括郵政條碼和專業的 2D 程式碼。 生成質量具有出色的模組大小、安靜區域及錯誤校正級別的精確控制。 然而,該API遵循Aspose獨特的慣例,可能會覺得不熟悉。 相比之下,IronBarcode的著色方案使用更直觀的方法名稱。 自定義 QR 碼範例展示了清晰的 API 設計。

// Aspose.BarCode generation with custom settings
using Aspose.BarCode.Generation;

var generator = new BarcodeGenerator(EncodeTypes.DataMatrix, "ASPOSE-123");
generator.Parameters.Barcode.XDimension.Millimeters = 0.5f;
generator.Parameters.Barcode.DataMatrix.DataMatrixEcc = DataMatrixEccType.Ecc200;
generator.Save("datamatrix.png", BarCodeImageFormat.Png);

// Reading barcodes with specific settings
var reader = new BarCodeReader("barcode.png", DecodeType.AllSupportedTypes);
reader.QualitySettings = QualitySettings.HighPerformance;
foreach (BarCodeResult result in reader.ReadBarCodes())
{
    Console.WriteLine($"Type: {result.CodeTypeName}, Value: {result.CodeText}");
}
// Aspose.BarCode generation with custom settings
using Aspose.BarCode.Generation;

var generator = new BarcodeGenerator(EncodeTypes.DataMatrix, "ASPOSE-123");
generator.Parameters.Barcode.XDimension.Millimeters = 0.5f;
generator.Parameters.Barcode.DataMatrix.DataMatrixEcc = DataMatrixEccType.Ecc200;
generator.Save("datamatrix.png", BarCodeImageFormat.Png);

// Reading barcodes with specific settings
var reader = new BarCodeReader("barcode.png", DecodeType.AllSupportedTypes);
reader.QualitySettings = QualitySettings.HighPerformance;
foreach (BarCodeResult result in reader.ReadBarCodes())
{
    Console.WriteLine($"Type: {result.CodeTypeName}, Value: {result.CodeText}");
}
Imports Aspose.BarCode.Generation
Imports Aspose.BarCode.BarCodeRecognition

' Aspose.BarCode generation with custom settings
Dim generator As New BarcodeGenerator(EncodeTypes.DataMatrix, "ASPOSE-123")
generator.Parameters.Barcode.XDimension.Millimeters = 0.5F
generator.Parameters.Barcode.DataMatrix.DataMatrixEcc = DataMatrixEccType.Ecc200
generator.Save("datamatrix.png", BarCodeImageFormat.Png)

' Reading barcodes with specific settings
Dim reader As New BarCodeReader("barcode.png", DecodeType.AllSupportedTypes)
reader.QualitySettings = QualitySettings.HighPerformance
For Each result As BarCodeResult In reader.ReadBarCodes()
    Console.WriteLine($"Type: {result.CodeTypeName}, Value: {result.CodeText}")
Next
$vbLabelText   $csharpLabel

大型組織欣賞 Aspose 的條碼 API 和標準支持。 然而,學習曲線較陡峭,價格較高。性能測試顯示每分鐘處理 500-800 個條碼,受損程式碼的準確率為 85-90%。 具有高級讀取器設置的庫通過更簡單的配置達到類似結果。 當處理時,兩個庫均提供有效的基於記憶的處理。 對於MSI 條碼識別,適當的配置變得不可或缺。

企業定價對初創公司的影響?

為什麼學習曲線會拖慢開發?

BarcodeLib 是否適合簡單的生成任務?

BarcodeLib.NET 條碼生成器顯示 Visual Studio 整合與 Windows Forms 工具箱及生成的條碼預覽窗口

與完整解決方案不同,BarcodeLib 僅生成條碼,不具備掃描功能。 BarcodeLib 在簡單的條碼建立方面表現出色,可應對如 Code39、Code128 或 UPC 等常見格式。 若想獲得生成和讀取能力,考慮完整的解決方案。 現代庫中的條碼生成功能提供更大的靈活性。

BarcodeLib 處理基本的生成任務,並具有簡單的 API。 您的應用可以生成具有可自定義大小、顏色和文字註解的條碼圖像。 該庫為零售和物流生成行業標準條碼。 然而,定製功能有限,無法新增標識或應用高級樣式,如漸變填充或自定義邊距。 現代庫提供完整樣式,包含顏色、重設大小和註解。

// Simple barcode generation with BarcodeLib
using BarcodeLib;

var barcode = new Barcode();
barcode.IncludeLabel = true;
barcode.AlternateLabel = "Product Code";
barcode.RotateFlipType = RotateFlipType.RotateNoneFlipNone;
var img = barcode.Encode(TYPE.CODE128, "12345678", Color.Black, Color.White, 300, 150);
img.Save("simple-barcode.png", ImageFormat.Png);

// Limited customization options
barcode.LabelPosition = LabelPositions.BOTTOMCENTER;
barcode.EncodedType = TYPE.UPCA;
var upcImage = barcode.Encode("123456789012");
// Simple barcode generation with BarcodeLib
using BarcodeLib;

var barcode = new Barcode();
barcode.IncludeLabel = true;
barcode.AlternateLabel = "Product Code";
barcode.RotateFlipType = RotateFlipType.RotateNoneFlipNone;
var img = barcode.Encode(TYPE.CODE128, "12345678", Color.Black, Color.White, 300, 150);
img.Save("simple-barcode.png", ImageFormat.Png);

// Limited customization options
barcode.LabelPosition = LabelPositions.BOTTOMCENTER;
barcode.EncodedType = TYPE.UPCA;
var upcImage = barcode.Encode("123456789012");
Imports BarcodeLib
Imports System.Drawing
Imports System.Drawing.Imaging

Dim barcode As New Barcode()
barcode.IncludeLabel = True
barcode.AlternateLabel = "Product Code"
barcode.RotateFlipType = RotateFlipType.RotateNoneFlipNone
Dim img As Image = barcode.Encode(TYPE.CODE128, "12345678", Color.Black, Color.White, 300, 150)
img.Save("simple-barcode.png", ImageFormat.Png)

' Limited customization options
barcode.LabelPosition = LabelPositions.BOTTOMCENTER
barcode.EncodedType = TYPE.UPCA
Dim upcImage As Image = barcode.Encode("123456789012")
$vbLabelText   $csharpLabel

BarcodeLib 對快速的免費解決方案很堅固,且無需更大的 SDK 負擔。 然而,對於像是 PDF、移動應用或掃描的高級使用情境不支持。 該庫缺少較新的格式和Unicode 編碼。 對於1BPP 條碼圖片流式條碼,您需要可靠的解決方案。 使用MSI安裝程式時,注意潛在的DLL缺失問題

創業公司何時應選擇最小的解決方案?

  • 免費和開源,並有簡單的許可。

  • 欠缺複雜配置,條碼基本生成開箱即用。

  • 與完整的條碼 SDKs 相比,重量輕且速度快。

  • 适於在載入商業解決方案之間進行原型設計。

您需要哪些功能之後會被替代?

為何考慮選擇 Dynamsoft 用於高效能掃描?

Dynamsoft Barcode Reader SDK 首頁顯示三個產品版本包括 Web、Mobile 和 Server/Desktop 平台功能和試用選項

Dynamsoft Barcode Reader SDK 專注於企業和移動應用的速度和準確性。 該庫在物流、醫療和零售的即時掃描表現優異,尤其是現場攝像頭取景流的情況下。 對於網路應用,考慮Blazor 整合作為具成本效益的替代方案。.NET MAUI 條碼掃描器教學指導簡化的行動條碼掃描

性能基準於即時掃描中 Dynamsoft 在高速度掃描中表現最佳,每分鐘處理 1500-2000 個條碼,受損程式碼的準確率為 95% 以上。 SDK 包括針對移動攝像頭的透視校正及影像去模糊。 It supports iOS and Android deployment through Xamarin and .NET MAUI. 對於異步條碼讀取,兩個庫均提供可靠的解決方案。 在處理錯誤正確時,Dynamsoft 的算法可最大限度地減少不正確的檢測。

// Dynamsoft high-speed batch processing
using Dynamsoft.DBR;

var reader = new BarcodeReader();
reader.ProductKeys = "YOUR-LICENSE-KEY";

var settings = reader.GetRuntimeSettings();
settings.ExpectedBarcodesCount = 0; // Read all barcodes
settings.BarcodeFormatIds = (int)EnumBarcodeFormat.BF_ALL;
settings.DeblurLevel = 9; // Maximum deblur for mobile cameras
settings.ScaleUpModes[0] = ScaleUpMode.SUM_LINEAR_INTERPOLATION;
reader.UpdateRuntimeSettings(settings);

// Process video frame
var results = reader.DecodeBuffer(frameBuffer, frameWidth, frameHeight, frameStride, EnumImagePixelFormat.IPF_RGB_888, "");
foreach (var result in results)
{
    Console.WriteLine($"Barcode: {result.BarcodeText}, Confidence: {result.Confidence}");
}
// Dynamsoft high-speed batch processing
using Dynamsoft.DBR;

var reader = new BarcodeReader();
reader.ProductKeys = "YOUR-LICENSE-KEY";

var settings = reader.GetRuntimeSettings();
settings.ExpectedBarcodesCount = 0; // Read all barcodes
settings.BarcodeFormatIds = (int)EnumBarcodeFormat.BF_ALL;
settings.DeblurLevel = 9; // Maximum deblur for mobile cameras
settings.ScaleUpModes[0] = ScaleUpMode.SUM_LINEAR_INTERPOLATION;
reader.UpdateRuntimeSettings(settings);

// Process video frame
var results = reader.DecodeBuffer(frameBuffer, frameWidth, frameHeight, frameStride, EnumImagePixelFormat.IPF_RGB_888, "");
foreach (var result in results)
{
    Console.WriteLine($"Barcode: {result.BarcodeText}, Confidence: {result.Confidence}");
}
Imports Dynamsoft.DBR

' Dynamsoft high-speed batch processing
Dim reader As New BarcodeReader()
reader.ProductKeys = "YOUR-LICENSE-KEY"

Dim settings = reader.GetRuntimeSettings()
settings.ExpectedBarcodesCount = 0 ' Read all barcodes
settings.BarcodeFormatIds = CType(EnumBarcodeFormat.BF_ALL, Integer)
settings.DeblurLevel = 9 ' Maximum deblur for mobile cameras
settings.ScaleUpModes(0) = ScaleUpMode.SUM_LINEAR_INTERPOLATION
reader.UpdateRuntimeSettings(settings)

' Process video frame
Dim results = reader.DecodeBuffer(frameBuffer, frameWidth, frameHeight, frameStride, EnumImagePixelFormat.IPF_RGB_888, "")
For Each result In results
    Console.WriteLine($"Barcode: {result.BarcodeText}, Confidence: {result.Confidence}")
Next
$vbLabelText   $csharpLabel

SDK 包括強 documentation 和 premium 定價的專業支持。 優先考慮性能和可靠性的機構可能會覺得成本合理。 移動功能包括手電控制、縮放和感興趣區域選擇。 關於PDF 條碼讀取,評估專業功能是否值得支付更高的價格。 該庫能夠優雅地處理運行時異常。 當AWS Lambda上部屬時,適當的記憶體分配確保較佳性能。

何時性能要求做到值部價格?

  • 行業領先的準確性和速度,高于 條碼演示 中即時掃描。

  • 優秀的行動裝置支持,與iOSAndroid優化相匹配。

  • 對挑戰條件的高級處理,包括自動方向

  • 良好的文件和專業支持,支持工程請求

  • 專業算法用於支持物流/醫療的Code 39和行業格式。

企業定價如何影響自籌資金之團隊?

您應選擇哪個 C# 條碼庫?

您的項目需求和使用案例決定了最佳條碼庫的選擇:

對於零售/POS系統:IronBarcode 提供了最優的平衡,支持零售格式(如 UPC、EAN、Code 128)和 QR 碼以用於行動支付。 其錯誤校正保證能夠可靠地掃描磨損的條碼。 條碼生成器 教學提供快速實施。 基於網頁的POS系統通過HTML匯出獲益,實現流暢整合。

適合倉儲/物流:Dynamsoft擅長高速批次掃描,而IronBarcode的 PDF支援多條碼閱讀可有效處理運輸文件。 考慮設定裁切區域來提高速度。 基於流的閱讀使得文件處理更加高效,無需臨時檔。 ASP.NET部署需要正確的web.config授權配置

適合醫療保健: Aspose.BarCode 提供完整格式支援包括醫療條碼,雖然IronBarcode的GS1-128支援涵蓋醫療器械標籤。 兩者都處理Code 39閱讀以進行病人識別。 置信度門檻確保準確的資料擷取。 在醫療標籤中,1-BPP條碼圖像的正確配置確保列印品質。

適合製造業: IronBarcode的Data Matrix和PDF417配合Unicode編碼可處理全球供應鏈標記。 新格式支援包括工業應用。 當從資料建立條碼時,該程式庫能夠管理包括二進位資料在內的不同輸入。 儲存條碼功能支持所有主要影像格式。

// Manufacturing example: Create DataMatrix with production data
using IronBarCode;
using System.Text;

// Encode production data with Unicode support
var productionData = new StringBuilder();
productionData.AppendLine("PN: ABC-12345");
productionData.AppendLine("SN: 2024-001");
productionData.AppendLine("製造日: 2024-01-15"); // Unicode Japanese
productionData.AppendLine("Lot: A1B2C3");

var dataMatrix = BarcodeWriter.CreateBarcode(
    productionData.ToString(), 
    BarcodeWriterEncoding.DataMatrix
);

dataMatrix.ResizeTo(200, 200)
          .SetMargins(5)
          .SaveAsImage("production-label.png");

// Generate PDF report with multiple barcodes
var pdf = BarcodeWriter.CreateBarcodePdf(
    new string[] { "PART-001", "PART-002", "PART-003" },
    BarcodeWriterEncoding.Code128,
    300, 150
);
pdf.SaveAs("parts-inventory.pdf");
// Manufacturing example: Create DataMatrix with production data
using IronBarCode;
using System.Text;

// Encode production data with Unicode support
var productionData = new StringBuilder();
productionData.AppendLine("PN: ABC-12345");
productionData.AppendLine("SN: 2024-001");
productionData.AppendLine("製造日: 2024-01-15"); // Unicode Japanese
productionData.AppendLine("Lot: A1B2C3");

var dataMatrix = BarcodeWriter.CreateBarcode(
    productionData.ToString(), 
    BarcodeWriterEncoding.DataMatrix
);

dataMatrix.ResizeTo(200, 200)
          .SetMargins(5)
          .SaveAsImage("production-label.png");

// Generate PDF report with multiple barcodes
var pdf = BarcodeWriter.CreateBarcodePdf(
    new string[] { "PART-001", "PART-002", "PART-003" },
    BarcodeWriterEncoding.Code128,
    300, 150
);
pdf.SaveAs("parts-inventory.pdf");
Imports IronBarCode
Imports System.Text

' Encode production data with Unicode support
Dim productionData As New StringBuilder()
productionData.AppendLine("PN: ABC-12345")
productionData.AppendLine("SN: 2024-001")
productionData.AppendLine("製造日: 2024-01-15") ' Unicode Japanese
productionData.AppendLine("Lot: A1B2C3")

Dim dataMatrix = BarcodeWriter.CreateBarcode(productionData.ToString(), BarcodeWriterEncoding.DataMatrix)

dataMatrix.ResizeTo(200, 200) _
          .SetMargins(5) _
          .SaveAsImage("production-label.png")

' Generate PDF report with multiple barcodes
Dim pdf = BarcodeWriter.CreateBarcodePdf(New String() {"PART-001", "PART-002", "PART-003"}, BarcodeWriterEncoding.Code128, 300, 150)
pdf.SaveAs("parts-inventory.pdf")
$vbLabelText   $csharpLabel
  • 簡單免費的解決方案如ZXing.Net和BarcodeLib適合作為起始點,但缺乏高級功能和生產精度。

  • Aspose.BarCode 可與現有Aspose工作流程順利結合用於企業級專案,儘管API參考顯示IronBarcode提供更直觀的方法。

  • Dynamsoft Barcode Reader對於實時移動掃描提供無與倫比的精度需要謹慎進行授權評估

  • 為了平衡的全功能條碼功能,IronBarcode脫穎而出。 這種方法提供了明確的好處:易於使用、有有效的生成和掃描、大範圍格式支援與彈性授權——使其成為為C#開發人員構建現代化.NET應用程式的最佳整體選擇。

使用IronBarcode,您的應用程式可立即使用條碼功能,僅需少量程式碼。 無論是構建桌面應用還是企業級網路服務,該程式庫都為您管理複雜性。 完整的文件教程讓快速入門,而像異步處理流支撐這樣的特性確保可擴展性。 對於MSI安裝程式的建立,IronBarcode提供了明確的DLL相依指引。 程式庫的安全措施確保了安全的管制行業部署。

👉 準備好開始了嗎?下載IronBarcode免費試用版,免費用於開發,看看如何輕鬆地將條碼功能新增至您的.NET應用程式。 查看快速入門指南並探索演示,了解IronBarcode的運作 為安全部署,查看安全CVE資訊並瞭解如何於生產環境中應用授權金鑰功能概述展示了您項目可用的完整能力。

請注意ZXing.Net, Aspose.BarCode, BarcodeLib和Dynamsoft Barcode Reader是其各自所有者的註冊商標。 此網站未與ZXing.Net, Aspose.BarCode, BarcodeLib或Dynamsoft Barcode Reader有任何聯繫、認可或贊助。 所有產品名稱、標誌和品牌均為其各自所有者的財產。 比較僅供資訊參考,並反映了撰寫時公開可用的資訊。

常見問題

什麼是條碼程式庫?

條碼程式庫是一種軟體組件,允許開發者在其應用中生成和讀取多種格式的條碼,如 QR Code、UPC-A 和 Data Matrix。

為什麼我應該在 C# 中使用條碼程式庫?

在 C# 中使用條碼程式庫允許開發者將條碼功能整合到他們的應用中,促進資料儲存和傳輸,並改善業務操作中的跟踪和減少錯誤。

有哪些 popular 的 .NET 條碼程式庫?

一些廣泛使用的 .NET 條碼程式庫包括 IronBarcode、ZXing.Net、Aspose.BarCode、BarcodeLib 和 Dynamsoft Barcode Reader。

using IronBarcode 有什麼優勢?

IronBarcode 提供簡易的整合、全面支援的條碼格式以及高效能,使其成為開發者希望在其應用中實現條碼功能時的可靠選擇。

QR Code 在條碼程式庫中的意義是什麼?

QR Code 是大多數條碼程式庫支援的一種流行條碼型別。它們用途廣泛,廣泛用於快速資訊共享,與傳統條碼相比能夠儲存更多資料。

IronBarcode 如何與 ZXing.Net 比較?

IronBarcode 提供更豐富的功能選擇,包括更好的不同條碼格式支援和更容易的整合,而 ZXing.Net 是一個免費的開源選擇,可能需要更多的配置。

條碼程式庫可以用於醫療保健應用嗎?

是的,條碼程式庫可以用於醫療保健應用,以簡化如病人識別、藥物跟踪和庫存管理等流程,從而提高效率並減少錯誤。

IronBarcode 可以生成哪些型別的條碼?

IronBarcode 可以生成各種條碼,包括 QR Code、UPC-A、Code 128 和 Data Matrix 等多種。

有免費版本的 IronBarcode 可以使用嗎?

IronBarcode 提供具有有限功能的免費版本,允許開發者在選擇擁有完整功能的付費版本之前評估其能力。

Data Matrix 條碼用於什麼?

Data Matrix 條碼用於在小空間中編碼大量資料,非常適合需要緊湊且高效的資料儲存的應用,例如在小型產品標籤上。

Curtis Chau
技術作家

Curtis Chau擁有Carleton大學的電腦科學學士學位,專精於前端開發,擁有Node.js、TypeScript、JavaScript和React的專業知識。Curtis熱衷於建立直觀且美觀的使用者介面,喜愛使用現代框架並建立結構良好、視覺吸引力的手冊。

除了開發,Curtis對物聯網(IoT)有濃厚的興趣,探索創新的方法來整合硬體和軟體。在空閒時間,他喜歡玩遊戲和建立Discord機器人,結合他對技術的熱愛與創造力。

Iron 支援團隊

我們線上24小時,每週5天。
聊天
電子郵件
給我打電話