C# + VB.NET: Barcode 快速入門 Barcode 快速入門
using IronBarCode;
using System.Drawing;

// Reading a barcode is easy with IronBarcode!
var resultFromFile = BarcodeReader.Read(@"file/barcode.png"); // From a file
var resultFromBitMap = BarcodeReader.Read(new Bitmap("barcode.bmp")); // From a bitmap
var resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg")); // From an image
var resultFromPdf = BarcodeReader.ReadPdf(@"file/mydocument.pdf"); // From PDF use ReadPdf

// To configure and fine-tune barcode reading, utilize the BarcodeReaderOptions class
var myOptionsExample = new BarcodeReaderOptions
{
    // Choose a reading speed from: Faster, Balanced, Detailed, ExtremeDetail
    // There is a tradeoff in performance as more detail is set
    Speed = ReadingSpeed.Balanced,

    // Reader will stop scanning once a single barcode is found (if set to true)
    ExpectMultipleBarcodes = true,

    // By default, all barcode formats are scanned for
    // Specifying a subset of barcode types to search for would improve performance
    ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,

    // Utilize multiple threads to read barcodes from multiple images in parallel
    Multithreaded = true,

    // Maximum threads for parallelized barcode reading
    // Default is 4
    MaxParallelThreads = 2,

    // The area of each image frame in which to scan for barcodes
    // Specifying a crop area will significantly improve performance and avoid noisy parts of the image
    CropArea = new Rectangle(),

    // Special setting for Code39 barcodes
    // If a Code39 barcode is detected, try to read with both the base and extended ASCII character sets
    UseCode39ExtendedMode = true
};

// Read with the options applied
var results = BarcodeReader.Read("barcode.png", myOptionsExample);

// Create a barcode with one line of code
var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8);

// After creating a barcode, we may choose to resize
myBarcode.ResizeTo(400, 100);

// Save our newly-created barcode as an image
myBarcode.SaveAsImage("EAN8.jpeg");

Image myBarcodeImage = myBarcode.Image; // Can be used as Image
Bitmap myBarcodeBitmap = myBarcode.ToBitmap(); // Can be used as Bitmap
Imports IronBarCode
Imports System.Drawing

' Reading a barcode is easy with IronBarcode!
Private resultFromFile = BarcodeReader.Read("file/barcode.png") ' From a file
Private resultFromBitMap = BarcodeReader.Read(New Bitmap("barcode.bmp")) ' From a bitmap
Private resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg")) ' From an image
Private resultFromPdf = BarcodeReader.ReadPdf("file/mydocument.pdf") ' From PDF use ReadPdf

' To configure and fine-tune barcode reading, utilize the BarcodeReaderOptions class
Private myOptionsExample = New BarcodeReaderOptions With {
	.Speed = ReadingSpeed.Balanced,
	.ExpectMultipleBarcodes = True,
	.ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,
	.Multithreaded = True,
	.MaxParallelThreads = 2,
	.CropArea = New Rectangle(),
	.UseCode39ExtendedMode = True
}

' Read with the options applied
Private results = BarcodeReader.Read("barcode.png", myOptionsExample)

' Create a barcode with one line of code
Private myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8)

' After creating a barcode, we may choose to resize
myBarcode.ResizeTo(400, 100)

' Save our newly-created barcode as an image
myBarcode.SaveAsImage("EAN8.jpeg")

Dim myBarcodeImage As Image = myBarcode.Image ' Can be used as Image
Dim myBarcodeBitmap As Bitmap = myBarcode.ToBitmap() ' Can be used as Bitmap

IronBarcode 支援多種標準格式,從圖像文件開始(jpeg、png 和 jpg)轉換為更具程式化的格式,您可能希望傳遞變數,例如位圖。此外,它還支持PDF等外部格式,允許IronBarcode無縫整合。

在任何代碼庫中,為開發人員提供文件格式和變量的靈活性。

除了是所有文件格式的條碼讀取器外,IronBarcode 還可作為條碼生成器,支援所有標準編碼和格式,如 EAN8Code128Code39。 設定條碼生成器只需要兩行代碼。 對於開發人員來說,IronBarcode 是條碼相關所有情況的首選,因為它具有入門門檻低且提供多樣化的自訂選項。

條碼編寫器

我們首先匯入 IronBarCodeSystem.Drawing,並實例化 BarcodeWriter,以創建一個格式為 EAN8 的條碼,條碼的字串值為 12345。 然後,我們將生成的條碼儲存為所需格式的圖片。 IronBarcode 支援將條碼製作成 Image 以及 Bitmap,因此有各種選擇。

進階BarcodeWriter

如上所述,使用 IronBarcode 生成條碼只需兩行程式碼,並將其保存為檔案以供日後使用。 IronBarcode 進一步延伸這一點,為開發人員提供大量選項,以自訂條碼以符合不同情況。

我們可以使用 ResizeTo 方法並傳入高度和寬度來調整條碼圖片的大小。

條碼讀取器

如上所述,我們首先實例化 BarcodeReader,將文件路徑傳遞給 Read 方法,並將其保存為變數以便稍後使用和操作條碼對象。 有指定的方法來讀取外部格式,例如使用 ReadPDF 來讀取 PDF; 然而,對於一般圖像格式和位圖,我們會使用 Read

條碼讀取器選項

IronBarcode允許開發人員從標準文件格式掃描條碼。 然而,在某些情況下,開發人員希望微調 Read 方法的行為,特別是在程式化地讀取一批條碼文件的情況下。 這就是 BarcodeReaderOptions 派上用場的地方。 IronPDF 允許您完全自訂,例如透過 Speed 調整讀取速度、使用 ExpectedMultipleBarcodes 設定文件中是否預期有多個條碼,以及使用屬性 ExpectBarcodeTypes 設定條碼的類型。 允許開發者運行多個線程以並行處理從多個圖像中讀取條碼,並設置在進行並行讀取時使用的線程數。

以下只是展示 IronBarcode 強大功能的一些屬性,完整列表請參閱文件。這裡 點擊此處查看操作指南,包括範例、示例代碼和文件。

C# + VB.NET: 不完善的條碼和圖像修正 不完善的條碼和圖像修正
using IronBarCode;
using IronSoftware.Drawing;

// Choose which filters are to be applied (in order)
// Set cacheAtEachIteration = true to save the intermediate image data after each filter is applied
var filtersToApply = new ImageFilterCollection(cacheAtEachIteration: true) {
    new SharpenFilter(),
    new InvertFilter(),
    new ContrastFilter(),
    new BrightnessFilter(),
    new AdaptiveThresholdFilter(),
    new BinaryThresholdFilter(),
    new GaussianBlurFilter(),
    new MedianBlurFilter(),
    new BilateralFilter()
};

BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
    // Set chosen filters in BarcodeReaderOptions
    ImageFilters = filtersToApply,

    Speed = ReadingSpeed.Balanced,
    ExpectMultipleBarcodes = true,
};

// Read with the options applied
BarcodeResults results = BarcodeReader.Read("screenshot.png", myOptionsExample);

AnyBitmap[] filteredImages = results.FilterImages();

// Export intermediate image files to disk
for (int i = 0 ; i < filteredImages.Length ; i++)
    filteredImages[i].SaveAs($"{i}_barcode.png");

// Or
results.ExportFilterImagesToDisk("filter-result.jpg");
Imports IronBarCode
Imports IronSoftware.Drawing

' Choose which filters are to be applied (in order)
' Set cacheAtEachIteration = true to save the intermediate image data after each filter is applied
Private filtersToApply = New ImageFilterCollection(cacheAtEachIteration:= True) From {
	New SharpenFilter(),
	New InvertFilter(),
	New ContrastFilter(),
	New BrightnessFilter(),
	New AdaptiveThresholdFilter(),
	New BinaryThresholdFilter(),
	New GaussianBlurFilter(),
	New MedianBlurFilter(),
	New BilateralFilter()
}

Private myOptionsExample As New BarcodeReaderOptions() With {
	.ImageFilters = filtersToApply,
	.Speed = ReadingSpeed.Balanced,
	.ExpectMultipleBarcodes = True
}

' Read with the options applied
Private results As BarcodeResults = BarcodeReader.Read("screenshot.png", myOptionsExample)

Private filteredImages() As AnyBitmap = results.FilterImages()

' Export intermediate image files to disk
For i As Integer = 0 To filteredImages.Length - 1
	filteredImages(i).SaveAs($"{i}_barcode.png")
Next i

' Or
results.ExportFilterImagesToDisk("filter-result.jpg")

IronBarcode 提供許多影像預處理濾鏡可以選擇,並可以輕鬆地在 BarcodeReaderOptions 中應用。 選擇可能改善影像讀取的濾鏡,例如銳化二值閾值對比度。 請記住,您選擇它們的順序就是它們被應用的順序。

可以选择保存每个滤镜应用后的中间图像的数据。 這可以通過 ImageFilterCollectionSaveAtEachIteration 屬性來切換。

C# + VB.NET: 創建條碼圖像 創建條碼圖像
using IronBarCode;
using System.Drawing;

/*** CREATING BARCODE IMAGES ***/

// Create and save a barcode in a single line of code
BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8).ResizeTo(400, 100).SaveAsImage("EAN8.jpeg");

/*****  IN-DEPTH BARCODE CREATION OPTIONS *****/

// BarcodeWriter.CreateBarcode creates a GeneratedBarcode which can be styled and exported as an Image object or file
GeneratedBarcode MyBarCode = BarcodeWriter.CreateBarcode("Any Number, String or Binary Value", BarcodeWriterEncoding.Code128);

// Style the Barcode in a fluent LINQ-style fashion
MyBarCode.ResizeTo(300, 150).SetMargins(20).AddAnnotationTextAboveBarcode("Example EAN8 Barcode").AddBarcodeValueTextBelowBarcode();
MyBarCode.ChangeBackgroundColor(Color.LightGoldenrodYellow);

// Save the barcode as an image file
MyBarCode.SaveAsImage("MyBarCode.png");
MyBarCode.SaveAsGif("MyBarCode.gif");
MyBarCode.SaveAsHtmlFile("MyBarCode.html");
MyBarCode.SaveAsJpeg("MyBarCode.jpg");
MyBarCode.SaveAsPdf("MyBarCode.Pdf");
MyBarCode.SaveAsPng("MyBarCode.png");
MyBarCode.SaveAsTiff("MyBarCode.tiff");
MyBarCode.SaveAsWindowsBitmap("MyBarCode.bmp");

// Save the barcode as a .NET native object
Image MyBarCodeImage = MyBarCode.Image;
Bitmap MyBarCodeBitmap = MyBarCode.ToBitmap();

byte[] PngBytes = MyBarCode.ToPngBinaryData();

using (System.IO.Stream PdfStream = MyBarCode.ToPdfStream())
{
    // Stream barcode image output also works for GIF, JPEG, PDF, PNG, BMP and TIFF
}

// Save MyBarCode as an HTML file or tag
MyBarCode.SaveAsHtmlFile("MyBarCode.Html");
string ImgTagForHTML = MyBarCode.ToHtmlTag();
string DataURL = MyBarCode.ToDataUrl();

// Save MyBarCode to a new PDF, or stamp it in any position on any page(s) of an existing document
MyBarCode.SaveAsPdf("MyBarCode.Pdf");
MyBarCode.StampToExistingPdfPage("ExistingPDF.pdf", 200, 50, 1);  // Position (200, 50) on page 1
MyBarCode.StampToExistingPdfPages("ExistingPDF.pdf", 200, 50, new[] { 1, 2, 3 }, "Password123");  // Multiple pages of an encrypted PDF
Imports IronBarCode
Imports System.Drawing

'''* CREATING BARCODE IMAGES **

' Create and save a barcode in a single line of code
BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8).ResizeTo(400, 100).SaveAsImage("EAN8.jpeg")

'''***  IN-DEPTH BARCODE CREATION OPTIONS ****

' BarcodeWriter.CreateBarcode creates a GeneratedBarcode which can be styled and exported as an Image object or file
Dim MyBarCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("Any Number, String or Binary Value", BarcodeWriterEncoding.Code128)

' Style the Barcode in a fluent LINQ-style fashion
MyBarCode.ResizeTo(300, 150).SetMargins(20).AddAnnotationTextAboveBarcode("Example EAN8 Barcode").AddBarcodeValueTextBelowBarcode()
MyBarCode.ChangeBackgroundColor(Color.LightGoldenrodYellow)

' Save the barcode as an image file
MyBarCode.SaveAsImage("MyBarCode.png")
MyBarCode.SaveAsGif("MyBarCode.gif")
MyBarCode.SaveAsHtmlFile("MyBarCode.html")
MyBarCode.SaveAsJpeg("MyBarCode.jpg")
MyBarCode.SaveAsPdf("MyBarCode.Pdf")
MyBarCode.SaveAsPng("MyBarCode.png")
MyBarCode.SaveAsTiff("MyBarCode.tiff")
MyBarCode.SaveAsWindowsBitmap("MyBarCode.bmp")

' Save the barcode as a .NET native object
Dim MyBarCodeImage As Image = MyBarCode.Image
Dim MyBarCodeBitmap As Bitmap = MyBarCode.ToBitmap()

Dim PngBytes() As Byte = MyBarCode.ToPngBinaryData()

Using PdfStream As System.IO.Stream = MyBarCode.ToPdfStream()
	' Stream barcode image output also works for GIF, JPEG, PDF, PNG, BMP and TIFF
End Using

' Save MyBarCode as an HTML file or tag
MyBarCode.SaveAsHtmlFile("MyBarCode.Html")
Dim ImgTagForHTML As String = MyBarCode.ToHtmlTag()
Dim DataURL As String = MyBarCode.ToDataUrl()

' Save MyBarCode to a new PDF, or stamp it in any position on any page(s) of an existing document
MyBarCode.SaveAsPdf("MyBarCode.Pdf")
MyBarCode.StampToExistingPdfPage("ExistingPDF.pdf", 200, 50, 1) ' Position (200, 50) on page 1
MyBarCode.StampToExistingPdfPages("ExistingPDF.pdf", 200, 50, { 1, 2, 3 }, "Password123") ' Multiple pages of an encrypted PDF

在此示例中,我們看到可以創建、調整大小並保存多種不同類型和格式的條碼。 可能甚至只用一行程式碼。

使用我們的流暢API,生成的條碼類別可以用來設置邊距、調整大小和註解條碼。 然後,它們可以儲存為影像,IronBarcode 將自動從檔案名稱判斷正確的影像類型:GIFs、HTML 檔案、HTML 標籤、JPEGs、PDFs、PNGs、TIFFs 和 Windows Bitmaps

我們還提供了 StampToExistingPdfPage 方法,允許生成條碼並將其蓋印到現有的PDF上。 這在編輯通用PDF或透過條碼向文件添加內部識別號時非常有用。

C# + VB.NET: 條碼樣式和註釋 條碼樣式和註釋
using IronBarCode;
using System;
using System.Drawing;

/*** STYLING GENERATED BARCODES  ***/

// BarcodeWriter.CreateBarcode creates a GeneratedBarcode object which allows the barcode to be styled and annotated.
GeneratedBarcode MyBarCode = BarcodeWriter.CreateBarcode("Iron Software", BarcodeWriterEncoding.QRCode);

// Any text (or commonly, the value of the barcode) can be added to the image in a default or specified font.
// Text positions are automatically centered, above or below. Fonts that are too large for a given image are automatically scaled down.
MyBarCode.AddBarcodeValueTextBelowBarcode();
MyBarCode.AddAnnotationTextAboveBarcode("This is My Barcode", new Font(new FontFamily("Arial"), 12, FontStyle.Regular, GraphicsUnit.Pixel), Color.DarkSlateBlue);

// Resize, add margins and check final image dimensions
MyBarCode.ResizeTo(300, 300); // Resize in pixels
MyBarCode.SetMargins(0, 20, 0, 20); // Set margins in pixels

int FinalWidth = MyBarCode.Width;
int FinalHeight = MyBarCode.Height;

// Recolor the barcode and its background
MyBarCode.ChangeBackgroundColor(Color.LightGray);
MyBarCode.ChangeBarCodeColor(Color.DarkSlateBlue);
if (!MyBarCode.Verify())
{
    Console.WriteLine("Color contrast should be at least 50% or a barcode may become unreadable. Test using GeneratedBarcode.Verify()");
}

// Finally, save the result
MyBarCode.SaveAsHtmlFile("StyledBarcode.html");

/*** STYLING BARCODES IN A SINGLE LINQ-STYLE EXPRESSION ***/

// Create a barcode in one line of code
BarcodeWriter.CreateBarcode("https://ironsoftware.com", BarcodeWriterEncoding.Aztec).ResizeTo(250, 250).SetMargins(10).AddBarcodeValueTextAboveBarcode().SaveAsImage("StyledBarcode.png");

/*** STYLING QR CODES WITH LOGO IMAGES OR BRANDING ***/

// Use the QRCodeWriter.CreateQrCodeWithLogo Method instead of BarcodeWriter.CreateBarcode
// Logo will automatically be sized appropriately and snapped to the QR grid.

var qrCodeLogo = new QRCodeLogo("ironsoftware_logo.png");
GeneratedBarcode myQRCodeWithLogo = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo);
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen);
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen);
myQRCodeWithLogo.SaveAsPng("QRWithLogo.Png").SaveAsPdf("MyVerifiedQR.html"); // Save as 2 different formats
Imports IronBarCode
Imports System
Imports System.Drawing

'''* STYLING GENERATED BARCODES  **

' BarcodeWriter.CreateBarcode creates a GeneratedBarcode object which allows the barcode to be styled and annotated.
Private MyBarCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("Iron Software", BarcodeWriterEncoding.QRCode)

' Any text (or commonly, the value of the barcode) can be added to the image in a default or specified font.
' Text positions are automatically centered, above or below. Fonts that are too large for a given image are automatically scaled down.
MyBarCode.AddBarcodeValueTextBelowBarcode()
MyBarCode.AddAnnotationTextAboveBarcode("This is My Barcode", New Font(New FontFamily("Arial"), 12, FontStyle.Regular, GraphicsUnit.Pixel), Color.DarkSlateBlue)

' Resize, add margins and check final image dimensions
MyBarCode.ResizeTo(300, 300) ' Resize in pixels
MyBarCode.SetMargins(0, 20, 0, 20) ' Set margins in pixels

Dim FinalWidth As Integer = MyBarCode.Width
Dim FinalHeight As Integer = MyBarCode.Height

' Recolor the barcode and its background
MyBarCode.ChangeBackgroundColor(Color.LightGray)
MyBarCode.ChangeBarCodeColor(Color.DarkSlateBlue)
If Not MyBarCode.Verify() Then
	Console.WriteLine("Color contrast should be at least 50% or a barcode may become unreadable. Test using GeneratedBarcode.Verify()")
End If

' Finally, save the result
MyBarCode.SaveAsHtmlFile("StyledBarcode.html")

'''* STYLING BARCODES IN A SINGLE LINQ-STYLE EXPRESSION **

' Create a barcode in one line of code
BarcodeWriter.CreateBarcode("https://ironsoftware.com", BarcodeWriterEncoding.Aztec).ResizeTo(250, 250).SetMargins(10).AddBarcodeValueTextAboveBarcode().SaveAsImage("StyledBarcode.png")

'''* STYLING QR CODES WITH LOGO IMAGES OR BRANDING **

' Use the QRCodeWriter.CreateQrCodeWithLogo Method instead of BarcodeWriter.CreateBarcode
' Logo will automatically be sized appropriately and snapped to the QR grid.

Dim qrCodeLogo As New QRCodeLogo("ironsoftware_logo.png")
Dim myQRCodeWithLogo As GeneratedBarcode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo)
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen)
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen)
myQRCodeWithLogo.SaveAsPng("QRWithLogo.Png").SaveAsPdf("MyVerifiedQR.html") ' Save as 2 different formats

在此示例中,我們看到條形碼可以使用目標機器上安裝的任何字體,標註您選擇的文本或條形碼本身的值。如果該字體不可用,將選擇一個適當的相似字體。 條碼可以調整大小,增加邊距,並且條碼和背景都可以重新上色。 然後可以將它們保存為適當的格式。

在代碼的最後幾行中,您可以看到使用我們的流暢風格操作符,僅需幾行代碼就可以創建並設計條形碼,類似於 System.Linq

C# + VB.NET: 將條碼匯出為HTML 將條碼匯出為HTML
using IronBarCode;

GeneratedBarcode MyBarCode = BarcodeWriter.CreateBarcode("1234567890", BarcodeWriterEncoding.Code128);

// Save as a stand-alone HTML file without any image assets
MyBarCode.SaveAsHtmlFile("MyBarCode.html");

// Save as a stand-alone HTML image tag which can be served in HTML files, ASPX or MVC Views. No image assets required, the tag embeds the entire image in its source content
string ImgTag = MyBarCode.ToHtmlTag();

// Turn the image into a HTML/CSS Data URI.
string DataURI = MyBarCode.ToDataUrl();
Imports IronBarCode

Private MyBarCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("1234567890", BarcodeWriterEncoding.Code128)

' Save as a stand-alone HTML file without any image assets
MyBarCode.SaveAsHtmlFile("MyBarCode.html")

' Save as a stand-alone HTML image tag which can be served in HTML files, ASPX or MVC Views. No image assets required, the tag embeds the entire image in its source content
Dim ImgTag As String = MyBarCode.ToHtmlTag()

' Turn the image into a HTML/CSS Data URI.
Dim DataURI As String = MyBarCode.ToDataUrl()

IronBarcode 具備一個非常實用的功能,允許條碼以自包含的 HTML 格式輸出,這樣就不會有相關的圖像資產。 一切都包含在 HTML 文件中。

我們可以將內容導出為HTML檔案HTML圖像標籤資料URI

Human Support related to .NET 條碼庫

由我們開發團隊提供的人力支援

無論是產品、整合或授權問題,Iron 產品開發團隊都隨時為您解答所有問題。請聯絡我們並開始與 Iron 對話,在您的項目中充分利用我們的庫。

提出問題
Recognizes Barcode Qr related to .NET 條碼庫

識別 .NET Core、.NET Standard 和 .NET Framework 中的一維和二維條碼

IronBarcode .NET 條碼庫可以在 BarcodeEncoding 枚舉中讀取任何類型的條碼。它能識別 .NET Core、.NET Standard 和 .NET Framework 中的條碼。

為了節省時間並提升庫存工作流程的效率,IronBarcode 推薦使用一維(1D)或線性條碼,包括傳統且成熟的條碼類型,如 UPC 和 EAN 代碼。全球的銷售點服務通常使用 UPC(通用產品代碼)條碼(包含其變體 UPC-A 和 UPC-E)。它使目標消費者更容易識別和跟蹤倉庫和結帳時的產品特徵。UPCA 僅限於具有 12 到 13 位數字的數字內容,而 UPCE 支援 8 到 13 位數字的內容。

與 UPC 類似,歐洲市場使用 EAN 條碼來標籤消費品以供銷售點掃描。其變體包括 EAN-13 作為默認,而 EAN-8 用於包裝空間有限的產品,如糖果。除了靈活性外,作為高密度條碼,EAN-13 能緊湊地編碼較大的數據集。

1D 條碼並不止於此。

汽車和國防工業使用 Code 39 條碼。其名稱解釋了其能編碼 39 個字符的能力(現已修訂為 43 個)。類似地,Code 128 字符集和高數據密度。繼續在物流領域,包裝行業更喜歡使用 ITF(交錯 2 of 5)條碼來標籤包裝材料,如瓦楞紙板,由於其高印刷公差。而 MSI 更適合產品識別和庫存管理。

製藥行業使用製藥二進制代碼。而 RSS 14(縮小空間符號)和 Databar 條碼則是 1D 和 2D 條碼的混合。它是醫療保健用於標記小物品的優選。類似於 Code 128 條碼,Codabar 也是物流和醫療保健的喜愛。它可不依賴電腦工作,且可以通過點陣打印機輸出讀取。

2D 條碼包括 Aztec、Data Matrix、Data Bar、IntelligentMail、Maxicode、QR code。在不同的行業中使用,Aztec 用於交通行業的票和登機牌上,並能在低解析度下讀取。IntelligentMail 限於美國郵件的特定用途,而 Maxicode 用於標準化運輸追踪。

最廣為人知的條碼是 QR code。由於其靈活性、容錯率、可讀性,支持多種數據類型,如數字、字母數字、字節/二進制、和日文漢字,它具有廣泛的用途,從 B2B 到 B2C。

一旦確定類型,IronBarcode 作為領先的條碼生成器會接手!

查看完整功能列表
Fast And Polite Behavior related to .NET 條碼庫

開始您的條碼生成和閱讀項目,使用 .NET Barcode Reader

在 .NET 中读取条码类型现在变得非常轻松,通过 IronBarcode 的多功能、先进且高效的库。

从哪里开始?

安装 IronBarcode 的 NuGet 包或手动将 DLL 安装到您的项目或全局程序集缓存中。您现在离用 行代码生成 C# 条码图像扫描应用程序又近了一步。提取条码图像、值、编码类型、二进制数据(如有),然后将其全部输出到控制台。

TryHarder - 更深入扫描倾斜的条码格式

将 IronBarcode 的 TryHarder 变量添加到 QuicklyReadOneBarcode 方法后,应用程序会更努力地尝试,尽管会消耗更多时间,但能更彻底地分析被遮挡、倾斜或损坏的二维码图像格式。

您可以随意指定多种格式

您可以指定您正在寻找的条码编码,或指定多种格式 - IronBarcode 为您提供无限的条码分析工具。

您可以提高条码读取的性能和准确性。您可以使用管道字符或“按位或”同时指定各种条码格式。或者,通过 BarcodeReader.ReadASingleBarcode 方法实现更多的特异性和质量。

从 PDF 文档读取条码,到扫描,到多线程

如果您的下一个项目是读取扫描的 PDF 文档并寻找所有一维条码,同样,IronBarcode 不会让您失望。与从单个文档读取单个条码相似,但现在增加了有关条码所属页码的信息。

同样地,从多帧 TIFF 达到相同的效果。这方面的处理方式与 PDF 类似。

多线程是否让您感到困扰?如果是这样,IronBarcode 支持多线程!

要读取多个文档,您可以通过创建文档列表并使用 BarcodeReader.ReadBarcodesMultithreaded 方法,在 IronBarcode 的帮助下获得更好的结果。这使用多个线程,可能利用您所有的 CPU 内核进行条码扫描过程,比一次读取一个条码的速度成倍提升。

担心不完美的图像已成过去,完美条码生成器在此提供帮助

在现实世界中,用户可能希望扫描一个不是完美的屏幕截图、PNG 图像或照片的条码。传统的开源 .NET 条码生成器和读取库将无法读取任何不太完美的图像格式。然而,IronBarcode 使这一切变得非常简单。

QuicklyReadOneBarcode 的 TryHarder 方法使 IronBarcode 可以矫正并从不完美的数字样本中读取条码。

照片、扫描和缩略图

如果一张照片倾斜,请设置特定的条码旋转和图像校正,以合理纠正从手机相机预期的数字噪声、倾斜、透视和旋转。

同样,读取扫描 PDF 中的 QR 码和 PDF-417 条码需要设置合适的条码旋转校正和条码图像校正,以轻度清理文档。但必须注意不要过度指定以免影响性能。

如果您有一个损坏的条码缩略图,IronBarcode 读取方法会自动检测到过小的条码图像,并放大和清理所有与缩略图相关的数字噪声,使其重新可读。

对于开发人员来说事情再简单不过了!

了解更多
Built For Dot Net related to .NET 條碼庫

為 .NET Core 專案設計的簡易使用

只需幾行程式碼即可在幾分鐘內開始使用。專為 .NET Core、.NET Standard 和 Framework 构建,作為一个易於使用的單一 DLL;無需依賴;支援 32 位和 64 位;适用于任何 .NET 语言。可用於 Web、雲端、桌面或控制台應用程式;支持移動和桌面設備。您可以從這個链接下載軟體產品。

為 .NET 而建, C#, QR碼

立即開始
Write Barcodes related to .NET 條碼庫

總結IronBarcode - 用於創建和操作條碼圖像

由於IronBarcode能夠輕鬆創建、調整大小和儲存各種條碼類型和格式,這沒有理由不立即開始使用!

使用Fluent API,利用生成的條碼類來設置邊距、調整大小和注釋條碼。然後以圖片格式存檔,IronOCR會自動從文件名稱假設正確的圖片類型。無論是GIF、HTML文件、HTML標籤、JPEG、PNG、TIFF和Windows位圖。

StampToExistingPdfPage方法允許生成條碼並將其蓋印到現有的PDF上。這在編輯一般PDF或通過條碼向文件添加內部識別號時非常有用。

立即聯繫全天候24/7有人客服支援。無論您有問題還是需要專案支援;您可以從我們的30天試用密鑰開始,利用簡單易懂的英語的廣泛文檔資源,或從$749的終身授權中受益。

了解更多
支持:
  • .NET Core 2.0 及以上版本
  • .NET Framework 4.0及以上版本支持C#、VB、F#
  • Microsoft Visual Studio. .NET 開發 IDE 圖標
  • NuGet 安裝程式支援 Visual Studio
  • JetBrains ReSharper C# 語言助理相容
  • Microsoft Azure C#.NET 託管平台相容

授權與定價

免費社區開發許可證。商業許可證起價$749。

項目C# + VB.NET庫授權

專案

開發人員C# + VB.NET 庫許可證

開發人員

組織 C# + VB.NET 庫授權

組織

代理機構 C# + VB.NET 庫許可

代理商

SaaS C# + VB.NET 程式庫授權

SaaS

OEM C# + VB.NET 庫許可證

OEM

查看完整授權選項  

條碼和QR教學:適用於C#和VB .NET

教程 + 代碼範例 在 C# 中讀取條碼 | .NET 教程

C# .NET 條碼 QR

Frank Walker .NET 產品開發人員

讀取條碼和QR碼 | C# VB .NET 教程

看看Frank如何使用IronBarcode從掃描件、照片和PDF文件中讀取條碼,並將其集成到他的C# .NET條碼應用程式中...

觀看Frank的條碼讀取教程
編寫條碼教學 + C# 和 VB.NET 的代碼範例

C# .NET 條碼

弗朗西斯卡·米勒 初級.NET工程師

在 C# 或 VB.NET 生成條碼圖像

Francesca 分享了一些在 C# 或 VB 應用程序中將條碼寫入圖像的技巧和竅門。瞭解如何使用 IronBarcode 編寫條碼以及所有可用的選項...

請參考Francesca的條碼教學
教程 + 代碼範例 VB.NET PDF 創建和編輯 | VB.NET & ASP.NET PDF

QR .NET C# VB

Jennifer Wright 應用架構主管

C# 和 VB .NET 應用程式撰寫 QR 碼的教程

Jenny 的團隊每天使用 IronBarcode 編寫數千個 QR 碼。 查看他們關於充分利用 IronBarcode 的教程...

珍妮團隊的 QR 編寫教程
成千上萬的開發人員使用IronBarcode來...

會計和金融系統

  • # 收據
  • # 報告
  • # 發票列印
為 ASP.NET 會計和財務系統添加 PDF 支持

企業數位化

  • # 文件資料
  • # 訂購與標籤
  • # 紙張替代
C# 業務數位化用例

企業內容管理

  • # 內容製作
  • # 文件管理
  • # 內容分發
.NET CMS PDF 支援

數據和報告應用程式

  • # 效能追蹤
  • # 趨勢映射
  • # 報告
C# PDF 報告
Iron Software 企業 .NET 組件開發者

成千上萬的企業、政府、中小企業和開發人員都信賴 Iron software 產品。

Iron 團隊在 .NET 軟體元件市場有超過 10 年的經驗。

Iron 客戶圖標
Iron 客戶圖標
Iron 客戶圖標
Iron 客戶圖標
Iron 客戶圖標
Iron 客戶圖標
Iron 客戶圖標
Iron 客戶圖標