在實際環境中測試
在生產環境中測試無浮水印。
在任何需要的地方都能運作。
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
<p>IronBarcode 支援多種標準格式,從圖像文件開始(jpeg、png 和 jpg)轉換為更具程式化的格式,您可能希望傳遞變數,例如位圖。此外,它還支持PDF等外部格式,允許IronBarcode無縫整合。</p> <p>在任何代碼庫中,為開發人員提供文件格式和變量的靈活性。</p> <p>除了是所有文件格式的條碼讀取器外,IronBarcode 還可作為條碼生成器,支援所有標準編碼和格式,如 <code>EAN8</code>、<code>Code128</code> 和 <code>Code39</code>。 設定條碼生成器只需要兩行代碼。 對於開發人員來說,IronBarcode 是條碼相關所有情況的首選,因為它具有入門門檻低且提供多樣化的自訂選項。</p> <div class="hsg-featured-snippet examples__featured-snippet"> <h2>C#中的條碼讀取器和條碼生成器</h2> <ol> <li><code>var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8);</code></li> <li><code>Image myBarcodeImage = myBarcode.Image;</code></li> <li><code>myBarcode.ResizeTo(400, 100);</code></li> <li><code>var resultFromFile = BarcodeReader.Read(@"file/barcode.png");</code></li> <li><code>var myOptionsExample = new BarcodeReaderOptions{...}</code></li> </ol> </div> <h3 id="anchor-36-49">條碼編寫器</h3> <p>我們首先匯入 <code>IronBarCode</code> 和 <code>System.Drawing</code>,並實例化 <code>BarcodeWriter</code>,以創建一個格式為 <code>EAN8</code> 的條碼,條碼的字串值為 <code>12345</code>。 然後,我們將生成的條碼儲存為所需格式的圖片。 IronBarcode 支援將條碼製作成 <code>Image</code> 以及 <code>Bitmap</code>,因此有各種選擇。</p> <h4 id="anchor-36-49barcodewriter">進階BarcodeWriter</h4> <p>如上所述,使用 IronBarcode 生成條碼只需兩行程式碼,並將其保存為檔案以供日後使用。 IronBarcode 進一步延伸這一點,為開發人員提供大量選項,以自訂條碼以符合不同情況。</p> <p>我們可以使用 <code>ResizeTo</code> 方法並傳入高度和寬度來調整條碼圖片的大小。</p> <h3 id="anchor-36-49">條碼讀取器</h3> <p>如上所述,我們首先實例化 <code>BarcodeReader</code>,將文件路徑傳遞給 <code>Read</code> 方法,並將其保存為變數以便稍後使用和操作條碼對象。 有指定的方法來讀取外部格式,例如使用 <code>ReadPDF</code> 來讀取 PDF; 然而,對於一般圖像格式和位圖,我們會使用 <code>Read</code>。</p> <h4 id="anchor-36-49">條碼讀取器選項</h4> <p>IronBarcode允許開發人員從標準文件格式掃描條碼。 然而,在某些情況下,開發人員希望微調 <code>Read</code> 方法的行為,特別是在程式化地讀取一批條碼文件的情況下。 這就是 <code>BarcodeReaderOptions</code> 派上用場的地方。 IronPDF 允許您完全自訂,例如透過 <code>Speed</code> 調整讀取速度、使用 <code>ExpectedMultipleBarcodes</code> 設定文件中是否預期有多個條碼,以及使用屬性 <code>ExpectBarcodeTypes</code> 設定條碼的類型。 允許開發者運行多個線程以並行處理從多個圖像中讀取條碼,並設置在進行並行讀取時使用的線程數。</p> <p>以下只是展示 IronBarcode 強大功能的一些屬性,完整列表請參閱文件。<a href="/csharp/barcode/object-reference/api/IronBarCode.BarcodeReaderOptions.html" target="_blank">這裡</a> <a href="/csharp/barcode/how-to/read-barcodes-from-images/" class="code_content__related-link__doc-cta-link">點擊此處查看操作指南,包括範例、示例代碼和文件。</a></p>
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")
<p>IronBarcode 提供許多影像預處理濾鏡可以選擇,並可以輕鬆地在 <code>BarcodeReaderOptions</code> 中應用。 選擇可能改善影像讀取的濾鏡,例如<em>銳化</em>、<em>二值閾值</em>和<em>對比度</em>。 請記住,您選擇它們的順序就是它們被應用的順序。</p> <p>可以选择保存每个滤镜应用后的中间图像的数据。 這可以通過 <code>ImageFilterCollection</code> 的 <code>SaveAtEachIteration</code> 屬性來切換。</p>
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
<p>在此示例中,我們看到可以創建、調整大小並保存多種不同類型和格式的條碼。 可能甚至只用一行程式碼。</p> <p>使用我們的流暢API,生成的條碼類別可以用來設置邊距、調整大小和註解條碼。 然後,它們可以儲存為影像,IronBarcode 將自動從檔案名稱判斷正確的影像類型:<strong>GIFs、HTML 檔案、HTML 標籤、JPEGs、PDFs、PNGs、TIFFs 和 Windows Bitmaps</strong>。</p> <p>我們還提供了 <code>StampToExistingPdfPage</code> 方法,允許生成條碼並將其蓋印到現有的PDF上。 這在編輯通用PDF或透過條碼向文件添加內部識別號時非常有用。</p>
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
<p>在此示例中,我們看到條形碼可以使用目標機器上安裝的任何字體,標註您選擇的文本或條形碼本身的值。如果該字體不可用,將選擇一個適當的相似字體。 條碼可以調整大小,增加邊距,並且條碼和背景都可以重新上色。 然後可以將它們保存為適當的格式。</p> <p>在代碼的最後幾行中,您可以看到使用我們的流暢風格操作符,僅需幾行代碼就可以創建並設計條形碼,類似於 <code>System.Linq</code>。</p>
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()
<p>IronBarcode 具備一個非常實用的功能,允許條碼以自包含的 HTML 格式輸出,這樣就不會有相關的圖像資產。 一切都包含在 HTML 文件中。</p> <p>我們可以將內容導出為<strong>HTML檔案</strong>、<strong>HTML圖像標籤</strong>或<strong>資料URI</strong>。</p>
IronBarcode .NET 條碼庫可以讀取 BarcodeEncoding Enum 中的任何類型的條碼。它能識別 .NET Core、.NET Standard 及 .NET Framework 中的條碼。
為了節省時間並提高庫存工作流程的效率,IronBarcode建議使用一維(1D)或線性條碼,包括傳統和已建立的條碼類型,如UPC和EAN代碼。全球的銷售點服務通常使用UPC(萬用產品代碼)條碼(包括其變體UPC-A和UPC-E)。它使目標消費者能更容易地識別和跟踪倉庫和結帳處的產品特徵。UPC-A僅限於包含12到13位數字的數字內容,而UPC-E支持8到13位數字的內容。
與UPC類似,歐洲市場使用EAN條碼來標示消費品以進行銷售點掃描。其變體包括默認的EAN-13,而EAN-8則用於包裝空間有限的商品,如糖果。除了靈活性之外,作為高密度條碼,EAN-13能緊湊地編碼較大的數據集。
一維條碼不止於此。
汽車和國防工業使用 Code 39 條碼。它的名稱解釋了其編碼 39 個字符(現在修訂為 43 個字符)的能力。同樣的,Code 128 字符集和高數據密度。繼續物流方面,包裝行業偏好 ITF(交錯二五)條碼來標記包裝材料,如瓦楞紙板,因為它們具有高印刷容差。而 MSI 則更適用於產品識別和庫存管理。
製藥行業使用藥品二進制代碼。RSS 14(減少空間符號)和Databar條碼是1D和2D條碼的混合體。這是標記小型物品的醫療保健行業的最愛。類似於Code 128條碼,Codabar也是物流和醫療保健行業的最愛。它可以在沒有計算機的情況下運行,並且可以從點矩陣打印機輸出中讀取。
D 條碼包括 Aztec、Data Matrix、Data Bar、IntelligentMail、Maxicode、QR code。Aztec 在不同產業中使用,主要用於運輸業的票券和登機證,且在較低解析度下仍具可讀性。IntelligentMail 只能在美國郵件中的特定用途使用,而 Maxicode 則用於標準化貨物追踪。
最廣為人知的條碼是 QR 碼。由於其靈活性、容錯率、可讀性以及對數字、字母數字、字節/二進制和漢字等各種數據的支持,它有著從 B2B 到 B2C 的眾多用途。
一旦類型確定,IronBarcode——領先的條碼生成器就會接手!
使用 IronBarcode 的多功能、高級且高效的庫,在 .NET 中讀取條碼類型現在變得輕而易舉。
由於 IronBarcode 能夠輕鬆地創建、調整大小和保存各種條形碼類型和格式,因此沒有理由不立即開始使用它!
使用 Fluent API,使用生成的條碼類來設置邊距、調整大小和註釋條碼。然後將其保存為圖像,IronOCR 根據文件名自動假定正確的圖像類型。無論是 GIF、HTML 文件、HTML 標籤、JPEG、PNG、TIFF 和 Windows 位圖。
StampToExistingPdfPage 方法允許在現有的 PDF 上生成並加蓋條碼。這在編輯一般 PDF 或通過條碼向文件添加內部識別號時非常有用。
立即與24/7在線真人支援聯繫。無論您有問題還是需要項目支援,可以從我們的30天試用鑰匙開始,從我們易於理解的英語廣泛文件資源中受益,或者享受每年僅需$749的終身授權。
C# .NET 條碼 QR
看看Frank如何使用IronBarcode從掃描件、照片和PDF文件中讀取條碼,並將其集成到他的C# .NET條碼應用程式中...
觀看Frank的條碼讀取教程C# .NET 條碼
Francesca 分享了一些在 C# 或 VB 應用程序中將條碼寫入圖像的技巧和竅門。瞭解如何使用 IronBarcode 編寫條碼以及所有可用的選項...
請參考Francesca的條碼教學QR .NET C# VB
Jenny 的團隊每天使用 IronBarcode 編寫數千個 QR 碼。 查看他們關於充分利用 IronBarcode 的教程...
珍妮團隊的 QR 編寫教程Iron 團隊在 .NET 軟體元件市場有超過 10 年的經驗。