跳過到頁腳內容
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 false)
    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
IRON VB CONVERTER ERROR developers@ironsoftware.com
Install-Package BarCode

IronBarCode 支援多種標準格式,從映像檔(jpeg、png 和 jpg)到更適合程式化操作的格式(例如點陣圖),後者允許在程式中傳遞變數。此外,它還支援 PDF 等外部格式,使 IronBarCode 能夠無縫整合到任何程式碼庫中,並為開發人員提供處理文件格式和變數的靈活性。

除了可以讀取所有檔案格式的條碼外,IronBarcode 還可以作為條碼產生器,支援所有標準編碼和格式,例如EAN8Code128Code39 。 設定條碼產生器只需要兩行程式碼。 IronBarCode 的入門門檻低,並為開發人員提供了大量的自訂選項,是所有與條碼相關的場景的首選。

C# 中的條碼讀取器和條碼產生器

  1. var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeEncoding.EAN8);
  2. Image myBarcodeImage = myBarcode.ToImage();
  3. myBarcode.ResizeTo(400, 100);
  4. var resultFromFile = BarcodeReader.Read(@"file/barcode.png");
  5. var myOptionsExample = new BarcodeReaderOptions { /* Options */ };

條碼寫入器

我們首先導入必要的函式庫,如IronBarCodeSystem.Drawing ,並實例化BarcodeWriter來建立一個字串值為12345 、格式為EAN8的條碼。 然後我們將生成的條碼以所需格式儲存為圖像。 IronBarCode 支援將條碼建立為ImageBitmap ,因此有多種選擇。

進階條碼寫入器

如上所示,使用 IronBarCode 產生條碼只需要兩行程式碼,並將其儲存為檔案以供以後使用。 IronBarCode 進一步擴展了這項功能,為開發者提供了大量選項,可以根據具體情況自訂條碼。

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

條碼閱讀器

與上述類似,我們首先實例化BarcodeReader ,將檔案路徑傳遞給Read方法,並將其儲存為變數以便稍後使用和操作條碼物件。 ReadPDF提供了讀取外部格式(例如 PDF)的指定方法; 但是,對於一般的影像格式和點陣圖,我們將使用Read

條碼讀取器選項

IronBarCode 允許開發人員掃描標準檔案格式的條碼。 然而,在某些情況下,開發人員希望微調Read方法的行為,尤其是在以程式設計方式讀取一批條碼檔案的情況下。 這時BarcodeReaderOptions就派上用場了。 IronBarCode 可讓您完全自訂諸如讀取速度(使用Speed 、檔案中是否預期存在多個條碼(使用ExpectedMultipleBarcodes )以及條碼類型(使用ExpectBarcodeTypes屬性)等功能。 這樣一來,開發人員就可以運行多個執行緒來並行讀取多個映像中的條碼,還可以控制並行讀取時使用的執行緒數。

以上僅為IronBarCode強大功能的部分體現。 完整清單請參閱此處的文件。

透過我們的詳細指南學習如何建立條碼!

C# + VB.NET: 不完美的 BarCode 與影像校正 不完美的 BarCode 與影像校正
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")
Install-Package BarCode

IronBarcode 提供了許多影像預處理濾鏡供選擇,這些濾鏡可以輕鬆地在BarcodeReaderOptions中套用。 選擇可以改善影像讀取效果的濾鏡,例如銳利化二值閾值對比度。 請記住,您選擇它們的順序是它們實際應用的順序。

可以選擇保存應用每個濾波器後的中間影像的影像資料。 這可以透過ImageFilterCollectionSaveAtEachIteration屬性來切換。

精選程式碼範例重點

  • 我們建立BarcodeReaderOptions實例,並為其配置各種影像濾鏡: SharpenBinary ThresholdContrast
  • 過濾器按特定順序添加,指示其應用順序。
  • 透過將cacheAtEachIteration設為true ,該程式庫會在每次應用濾鏡後保存中間影像,這對於偵錯和分析非常有用。 最後,我們從圖像中讀取條碼,並將條碼類型和值列印到控制台。

了解更多關於IronBarcode的影像校正信息

C# + VB.NET: 建立 BarCode 影像 建立 BarCode 影像
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
Install-Package BarCode

在這個例子中,我們可以看到可以建立、調整大小和保存多種不同類型和格式的條碼; 甚至可能只需要一行程式碼。

利用我們流暢的 API,產生的條碼類別可用於設定邊距、調整大小和註解條碼。 然後,它們可以儲存為影像,IronBarcode 會自動根據檔案名稱假定正確的影像類型: GIF、HTML 檔案、HTML 標籤、JPEG、PDF、PNG、TIFF 和 Windows 位圖

我們還有StampToExistingPdfPage方法,該方法允許產生條碼並將其添加到現有的 PDF 中。 在編輯通用 PDF 文件或透過條碼向文件添加內部識別號碼時,此功能非常有用。

C# + VB.NET: BarCode 風格 & 註解 BarCode 風格 & 註解
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
Install-Package BarCode

在這個範例中,我們可以看到,條碼可以使用您選擇的文字或條碼本身的值進行註釋,並且可以使用目標電腦上已安裝的任何字型。如果目標電腦上沒有所需的字體,系統將選擇合適的類似字體。 條碼可以調整大小,可以添加邊距,條碼和背景都可以重新著色。 然後可以將它們儲存為合適的格式。

在最後幾行程式碼中,您可以看到,使用我們流暢的樣式運算符,只需幾行程式碼即可建立和設定條碼樣式,類似於System.Linq

C# + VB.NET: 將 BarCode 匯出為 HTML 將 BarCode 匯出為 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()
Install-Package BarCode

IronBarcode 有一個非常有用的功能,可以將條碼匯出為獨立的 HTML,這樣它就沒有關聯的圖像資源。 所有內容都包含在HTML檔案中。

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

在這個範例中

  • 我們使用BarcodeWriter.CreateBarcode來建立條碼,指定輸入資料和編碼類型。 然後我們使用 IronBarcode 提供的不同方法來匯出條碼:
  • ToHtmlTag()產生 HTML<img>可嵌入網頁的標籤。
  • ToDataUri()建立一個資料 URI 字串,該字串可用作資料來源<img>標籤或幾乎任何需要圖片 URL 的地方。
  • SaveAsHtmlFile()將條碼保存為獨立的 HTML 文件,其中包含所有圖像數據,使其便於攜帶和共享。

Human Support related to .NET BarCode 程式庫

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

無論是產品、整合或 License 方面的疑問,Iron 產品開發團隊都能隨時支援您的所有問題。請與 Iron 聯絡並展開對話,讓我們的函式庫在您的專案中發揮最大效用。

提出問題
Recognizes Barcode Qr related to .NET BarCode 程式庫

在 .NET Core、.NET Standard 和 .NET Framework 中識別一維和二維 BarCode

IronBarcode .NET 條碼函式庫可讀取 BarcodeEncoding Enum 內的任何類型條碼。它可以識別 .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 BarCode 並不局限於此。

汽車和國防工業使用 Code 39 條碼。

汽車和國防工業使用 Code 39 條碼,它的標題說明了它能夠編碼 39 個字元(現在修訂為 43 個)。同樣,Code 128 字符集和高資料密度。在物流方面,包裝業偏好使用 ITF (Interleaved 2 of 5) 條碼來標示包裝材料,例如瓦楞紙,因為其印刷公差較高。而 MSI 則是產品識別和庫存管理的首選。

製藥業採用藥品二進制條碼(Pharmaceutical Binary COde)。而 RSS 14(Reduced Space Symbologies)和 Databar 條碼是一維和二維條碼的混合。它是醫療保健最喜歡的小物品標記。類似於 Code 128 條碼,Codabar 也是物流和醫療保健的最愛。

2D 條碼包括 Aztec、Data Matrix、Data Bar、IntelligentMail、Maxicode、QR code。Aztec 應用於不同的產業,Aztec 用於運輸業的車票和登機證,在較低解析度下具有可讀性。IntelligentMail 只限於美國郵件的特定用途,而 Maxicode 則用於標準化貨物追蹤。

條碼中最廣為人知的是 QR 碼。由於它的靈活性,容錯性,可讀性,各種數據支持,如數字,字母數字,位元組/二進制,和漢字,它有大量的用途,從B2B到B2C。

一旦類型被確定,IronBarcode -領先的條碼生成器將從那裡開始!

查看完整功能清單
Fast And Polite Behavior related to .NET BarCode 程式庫

使用 .NET Barcode Reader 開始您的條碼產生與讀取專案

使用 IronBarcode 的多功能、先進和高效的庫,在 .NET 中讀取條碼類型現在變得輕而易舉。

您從哪裡開始?

安裝 IronBarcode 的 NuGet 包或手動安裝 DLL 到您的專案或您的全局程序集緩存。現在您距離在 one live of code 中製作一個 C# BarCode 圖片掃描器應用程式又近了一步。

TryHarder - Skewed Barcode Formats的更深掃描

在QuicklyReadOneBarcode方法中添加IronBarcode的TryHarder變量,使應用程序更努力地嘗試,儘管消耗更多的時間,但更徹底地分析模糊,歪斜或損壞的QR碼圖像格式。

自由指定多種格式

您可以指定您正在尋找的條碼編碼,或者指定多種格式 - IronBarcode 賦予您無限的條碼分析工具。您可以使用管道符或'Bitwize OR'同時指定多種條碼格式。或者,使用 BarcodeReader.ReadASingleBarcode 方法实现更高的具体性和质量。

从 PDF 文档,到扫描,到多线程

如果您的下一个项目是读取扫描的 PDF 文档并寻找所有的一维条码,同样 IronBarcode 不会让您失望。它與從單一文件讀取單一條碼類似,只是現在增加了條碼所屬頁碼的資訊。

同樣地,從一個多格的 TIFF 也可以達到相同的結果。在這方面,其處理方式與 PDF 相似。

多執行緒是否讓您感到困擾?如果是的,IronBarcode支持它!

要读取多个文档,您可以通过创建一个文档列表并使用BarcodeReader.ReadBarcodesMultithreaded方法来使用IronBarcode实现更好的效果。這會使用多個線程以及可能是您所有的 CPU 核心來進行條碼掃描的過程,並且會比一次讀取一個條碼的速度快上幾倍。

使用 Perfect Barcode Generator,擔心不完美的影像已成過去

在現實世界中,使用者可能希望掃描的條碼不是完美的螢幕截圖或 PNG 影像或照片。傳統的開放源碼 .NET 條碼產生器和讀取器函式庫將使其無法讀取任何不完美的圖像格式。

QuicklyReadOneBarcode的TryHarder方法的結果是IronBarcode可以從不完美的數位樣本中進行偏斜校正並讀取條碼。

照片、掃描和縮圖

如果照片是偏斜的,則設定特定的條碼旋轉和圖像校正,以修正手機相機合理預期的數位雜訊、偏斜、透視和旋轉。

類似地,從掃描的 PDF 中讀取 QR 代碼和 PDF-417 條碼需要設定適當等級的條碼旋轉校正和條碼影像校正,以輕鬆清理文件。

如果您有一個損壞的條碼縮略圖,那麼 IronBarcode 閱讀器方法會自動檢測太小的條碼圖像,並上縮,並清除所有與縮略圖相關的數位雜訊;使其再次可讀!

瞭解更多
Built For Dot Net related to .NET BarCode 程式庫

為了方便在 .NET Core 專案中使用而建立

幾行程式碼即可在幾分鐘內上手。專為 .NET Core、.NET Standard 及 Framework 所打造,為容易使用的單一 DLL;無相依性;支援 32 與 64 位元;可使用任何 .NET 語言。 可在 Web、Cloud、Desktop 或 Console 應用程式中使用;支援行動與桌上型裝置。您可以從此連結下載軟體產品。

為 .NET 而建、 C#, QR 碼

立即開始
Write Barcodes related to .NET BarCode 程式庫

總結 IronBarcode - 用於建立和操作條碼影像

由於 IronBarcode 便於各種條碼類型和格式的創建、調整大小和儲存,因此沒有理由不立即開始使用它!

使用 Fluent API,使用生成的條碼類別來設置邊距、調整大小和註釋條碼。然後利用 IronOCR 自動從檔案名稱假設正確的影像類型,並將其儲存為影像。無論是GIF,HTML文件,HTML標籤,JPEG,PNG,TIFF和Windows Bitmaps。

StampToExistingPdfPage方法允許生成條形碼並將其印在現有的PDF上。它在編輯通用 PDF 或通過 BarCode 為文檔添加內部識別號碼時非常有用。

立即與 LIVE 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

檢視完整授權選項  

C# & VB .NET 條碼與 QR 教程

教程 + 程式碼範例 在 C# | .NET 中讀取 BarCode 教程

C# .NET BarCode QR

Frank Walker .NET 產品開發人員

閱讀 Barcode & QRs | C# VB .NET 教程

查看 Frank 如何在他的 C# .NET 條碼應用程式中使用 IronBarcode 從掃描、照片和 PDF 文件中讀取條碼...

檢視 Frank 的 BarCode 讀取教學
在 C# & VB.NET 中編寫 BarCode Tutorial + Code Examples

C# .NET BarCode

Francesca Miller 初級 .NET 工程師

在 C# 或 VB.NET 中產生 BarCode 影像

Francesca 分享了一些在 C# 或 VB 應用程式中將 BarCode 寫成圖片的技巧和訣竅。請參閱如何編寫條碼,以及 IronBarcode 提供給您的所有選項...

查看 Francesca 的 BarCode 教程
教學 + 程式碼範例 VB.NET PDF 建立與編輯 | VB.NET & ASP.NET PDF

QR .NET C# VB

Jennifer Wright 應用程式架構主管

在 C# 和 VB .NET 應用程式中編寫 QR 碼的教學

Jenny's Team 使用 IronBarcode 每天編寫數以千計的 QRs。 請參閱他們有關如何充分利用 IronBarcode 的教學...

珍妮團隊的 QR 撰寫教程
數以千計的開發人員使用 IronBarcode 來...

會計與財務系統

  • # 收據
  • # 報告
  • # 發票列印
為 ASP.NET 會計與財務系統新增 PDF 支援

商業數位化

  • # 文件
  • # 訂購與標籤
  • # 紙張替換
C# 業務數位化使用案例

企業內容管理

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

資料與報告應用程式

  • # 效能追蹤
  • # 趨勢繪圖
  • # 報告
C# PDF 報告
Iron Software 企業 .NET 元件開發人員

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

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

Iron 客戶圖示
Iron 客戶圖示
Iron 客戶圖示
Iron 客戶圖示
Iron 客戶圖示
Iron 客戶圖示
Iron 客戶圖示
Iron 客戶圖示