QR Code 應用程式的程式碼範例
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 file
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");
// Get the barcode as an image for further processing
var myBarcodeImage = myBarcode.Image;
Imports IronBarCode
Imports System.Drawing
' Reading a barcode is easy with IronBarcode!
Dim resultFromFile = BarcodeReader.Read("file/barcode.png") ' From a file
Dim resultFromBitMap = BarcodeReader.Read(New Bitmap("barcode.bmp")) ' From a bitmap
Dim resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg")) ' From an image file
Dim resultFromPdf = BarcodeReader.ReadPdf("file/mydocument.pdf") ' From PDF use ReadPdf
' To configure and fine-tune barcode reading, utilize the BarcodeReaderOptions class
Dim myOptionsExample As New BarcodeReaderOptions With {
' 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
Dim results = BarcodeReader.Read("barcode.png", myOptionsExample)
' Create a barcode with one line of code
Dim 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")
' Get the barcode as an image for further processing
Dim myBarcodeImage = myBarcode.Image
來自我們開發團隊的直接人員支援
無論是產品、整合或授權問題,Iron 產品開發團隊都準備好支援您所有的問題。聯繫我們並與 Iron 進行對話,以發揮我們程式庫在您的計畫中的最大價值。發現多重 QR 碼型別
IronBarcode 讀取和生成大部分的條碼和 QR 標準,包括 UPC A/E、EAN 8/13、Code 39、Code 93、Code 128、ITF、MSI、RSS 14/Expanded、Databar、CodaBar、QR、Styled QR、Data Matrix、MaxiCode、PDF417、Plessey 和 Aztec。結果提供條碼資料、型別、頁面、文字和條碼影象;理想用於歸檔或索引系統。
使用影像預處理的快速且準確讀取
IronBarcode 自動預處理條碼影像以提高速度和准確度。修正旋轉、噪音、失真和傾斜以讀取掃描或即時影片幀。多核、多執行緒已準備好批量處理伺服器應用程式。在單頁和多頁文件中自動尋找一或多個條碼。在不需要複雜的 API 情況下,搜索特定的條碼型別或文件位置。將 QR 碼寫入多個格式
保存或列印到文件或串流,作為 PDF、JPG、TIFF、GIF、BMP、PNG 或 HTML 格式。設置顏色、質量、旋轉、大小和文字。使用 C# 條碼編程工具箱以及 IronPDF 和 IronOCR 完整 .NET 文件程式庫。支持:
C# 和 VB .NET 的 QR 碼教程

C#.NET條碼QR

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

在 C# 或 VB.NET 中生成條碼影像
Francesca 分享了一些在 C# 或 VB 應用程式中將條碼寫入影像的技巧和竅門。查看如何寫條碼以及 IronBarcode 提供給您的所有選項...
查看 Francesca 的條碼教程
QR.NETC#VB

在 C# 和 VB .NET 應用程式中編寫 QR 碼的教學
Jenny 的團隊每天使用 IronBarcode 寫數以千計的 QR 碼。查看他們的教程以充分利用 IronBarcode...
Jenny 團隊的 QR 編寫教程成千上萬的開發者使用 IronBarcode 來...
會計和金融系統
- # 收據
- # 報告
- # 發票列印
商業數位化
- # 文件
- # 訂單與標籤
- # 紙張替代

企業內容管理
- # 內容製作
- # 文件管理
- # 內容分發

資料和報告應用程式
- # 性能跟蹤
- # 趨勢映射
- # 報告

成千上萬的企業、政府、中小企業和開發者都信任 Iron 軟體產品。
Iron 團隊在 .NET 軟體元件市場擁有超過 10 年的經驗。








準備好開始了嗎?
Nuget Downloads 2,422,100|版本:2026.9剛剛發布








