在實際環境中測試
在生產環境中測試無浮水印。
在任何需要的地方都能運作。
using IronBarCode;
using System.Drawing;
// Creating a barcode is as simple as:
var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8);
// And save our barcode as in image:
myBarcode.SaveAsImage("EAN8.jpeg");
Image myBarcodeImage = myBarcode.Image; // Can be used as Image
Bitmap myBarcodeBitmap = myBarcode.ToBitmap(); // Can be used as Bitmap
// 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
// After creating a barcode, we may choose to resize and save which is easily done with:
var myNewBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8);
myNewBarcode.ResizeTo(400, 100);
myNewBarcode.SaveAsImage("myBarcodeResized.jpeg");
// To set more options and optimization with your Barcode Reading,
// Please utilize the BarcodeReaderOptions paramter of read:
var myOptionsExample = new BarcodeReaderOptions
{
// Choose a 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 barcode is found, unless set to true
ExpectMultipleBarcodes = true,
// By default, all barcode formats are scanned for.
// Specifying one or more, performance will increase.
ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,
// Utilizes multiple threads to reads barcodes from multiple images in parallel.
Multithreaded = true,
// Maximum threads for parallel. Default is 4
MaxParallelThreads = 2,
// The area of each image frame in which to scan for barcodes.
// Will improve performance significantly and avoid unwanted results and avoid noisy parts of the image.
CropArea = new Rectangle(),
// Special Setting for Code39 Barcodes.
// If a Code39 barcode is detected. Try to use extended mode for the full ASCII Character Set
UseCode39ExtendedMode = true
};
// And, apply:
var results = BarcodeReader.Read("barcode.png", myOptionsExample);
Imports IronBarCode
Imports System.Drawing
' Creating a barcode is as simple as:
Private myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8)
' And save our barcode as in 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
' 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
Dim resultFromPdf = BarcodeReader.ReadPdf("file/mydocument.pdf") ' From PDF use ReadPdf
' After creating a barcode, we may choose to resize and save which is easily done with:
Dim myNewBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8)
myNewBarcode.ResizeTo(400, 100)
myNewBarcode.SaveAsImage("myBarcodeResized.jpeg")
' To set more options and optimization with your Barcode Reading,
' Please utilize the BarcodeReaderOptions paramter of read:
Dim myOptionsExample = New BarcodeReaderOptions With {
.Speed = ReadingSpeed.Balanced,
.ExpectMultipleBarcodes = True,
.ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,
.Multithreaded = True,
.MaxParallelThreads = 2,
.CropArea = New Rectangle(),
.UseCode39ExtendedMode = True
}
' And, apply:
Dim results = BarcodeReader.Read("barcode.png", myOptionsExample)
<p>IronBarcode 支援多種標準格式,從圖像文件開始(jpeg、png 和 jpg)轉換為更具程式化的格式,您可能希望傳遞變數,例如位圖。此外,它還支持PDF等外部格式,允許IronBarcode無縫整合。</p> <p>在任何代碼庫中,為開發人員提供文件格式和變量的靈活性。</p> <p>除了是所有文件格式的條碼讀取器外,IronBarcode 還可作為條碼生成器,支援所有標準編碼和格式,如 <code>EAN8</code>、<code>Code128</code> 和 <code>Code39</code>。 設定條碼生成器只需要兩行代碼。 對於開發人員來說,IronBarcode 是條碼相關所有情況的首選,因為它具有入門門檻低且提供多樣化的自訂選項。</p> <h2 id="anchor-c-36-49">C#中的條碼讀取器和條碼生成器</h2> <ol> <li> <p>var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8);</p> </li> <li> <p>圖像 myBarcodeImage = myBarcode.Image;</p> </li> <li> <p>myBarcode.ResizeTo(400, 100);</p> <ol start="4"> <li> <pre><code class="language-zh_TW"> var resultFromFile = BarcodeReader.Read ```(@"file/barcode.png");</code></pre> </li> </ol> </li> <li>var myOptionsExample = new BarcodeReaderOptions{...}</li> </ol> <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-barcodereaderoptions">BarcodeReaderOptions</h4> <p>IronBarcode允許開發人員從標準文件格式掃描條碼。 然而,在某些情況下,開發人員希望微調 <code>Read</code> 方法的行為,特別是在程式化地讀取一批條碼文件的情況下。 這就是 <code>BarcodeReaderOptions</code> 派上用場的地方。 IronPDF讓您</p> <p>完全自定義內容,例如使用 <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></p> <p><a href="/csharp/barcode/how-to/read-barcodes-from-images/" target="__blank">點擊這裡查看操作指南,包括範例、示例代碼和文件 ></a></p>
using IronBarCode;
using IronSoftware.Drawing;
using System.Linq;
// Choose which filters are to be applied (in order);
var filtersToApply = new ImageFilterCollection() {
new SharpenFilter(),
new InvertFilter(),
new ContrastFilter(),
new BrightnessFilter(),
new AdaptiveThresholdFilter(),
new BinaryThresholdFilter()
};
BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
// Set chosen filters in BarcodeReaderOptions:
ImageFilters = filtersToApply,
// Other Barcode Reader Options:
Speed = ReadingSpeed.Balanced,
ExpectMultipleBarcodes = true,
};
// And, apply with a Read:
BarcodeResults results = BarcodeReader.Read("screenshot.png", myOptionsExample);
AnyBitmap[] filteredImages = results.FilterImages();
// Export file 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
Imports System.Linq
' Choose which filters are to be applied (in order);
Private filtersToApply = New ImageFilterCollection() From {
New SharpenFilter(),
New InvertFilter(),
New ContrastFilter(),
New BrightnessFilter(),
New AdaptiveThresholdFilter(),
New BinaryThresholdFilter()
}
Private myOptionsExample As New BarcodeReaderOptions() With {
.ImageFilters = filtersToApply,
.Speed = ReadingSpeed.Balanced,
.ExpectMultipleBarcodes = True
}
' And, apply with a Read:
Private results As BarcodeResults = BarcodeReader.Read("screenshot.png", myOptionsExample)
Private filteredImages() As AnyBitmap = results.FilterImages()
' Export file 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 提供了許多可在 BarcodeReaderOptions 中輕鬆應用的過濾器。 選擇可能改善圖像閱讀的過濾器,例如銳化、反轉(顏色), 和對比。請記住,您選擇它們的順序就是它們應用的順序。</p>
using IronBarCode;
using System.Drawing;
/*** CREATING BARCODE IMAGES ***/
// Shorthand:: 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 styles 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 MyBarCode 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 MyBarCode as a .NET native objects
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 HTML files and tags
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 200x50 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 **
' Shorthand:: 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 styles 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 MyBarCode 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 MyBarCode as a .NET native objects
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 HTML files and tags
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 200x50 on page 1
MyBarCode.StampToExistingPdfPages("ExistingPDF.pdf", 200, 50, { 1, 2, 3 }, "Password123") ' multiple pages of an encrypted PDF
<p>在此示例中,我們看到可以創建、調整大小並保存多種不同類型和格式的條碼。 可能甚至只用一行程式碼。</p> <p>使用 Fluent API,生成的條碼類可以用來設置邊距、調整大小和註釋條碼。 它們可以使用IronOCR自動保存為圖像,並從文件名中自動識別正確的圖像類型:<strong>GIF、HTML文件、HTML標籤、JPEG、PDF、PNG、TIFF和Windows位圖</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); // pixels
MyBarCode.SetMargins(0, 20, 0, 20);
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 ***/
// Fluent API
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 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) ' pixels
MyBarCode.SetMargins(0, 20, 0, 20)
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 **
' Fluent API
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 formats
<p>在此示例中,我們看到條形碼可以使用目標機器上安裝的任何字體,標註您選擇的文本或條形碼本身的值。如果該字體不可用,將選擇一個適當的相似字體。 條碼可以調整大小,增加邊距,並且條碼和背景都可以重新上色。 然後可以將它們保存為適當的格式。</p> <p>在代碼的最後幾行中,您可以看到使用我們的流暢風格操作符,僅需幾行代碼就可以創建並設計條形碼,類似於 <code>System.Linq</code>。</p>
using IronBarCode;
/*** EXPORTING BARCODES AS HTML FILES OR TAGS ***/
GeneratedBarcode MyBarCode = BarcodeWriter.CreateBarcode("1234567890", BarcodeWriterEncoding.Code128);
// Save as a stand-alone HTML file with no image assets required
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 Src contents
string ImgTag = MyBarCode.ToHtmlTag();
// Turn the image into an Html/CSS Data URI. https://en.wikipedia.org/wiki/Data_URI_scheme
string DataURI = MyBarCode.ToDataUrl();
Imports IronBarCode
'''* EXPORTING BARCODES AS HTML FILES OR TAGS **
Private MyBarCode As GeneratedBarcode = BarcodeWriter.CreateBarcode("1234567890", BarcodeWriterEncoding.Code128)
' Save as a stand-alone HTML file with no image assets required
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 Src contents
Dim ImgTag As String = MyBarCode.ToHtmlTag()
' Turn the image into an Html/CSS Data URI. https://en.wikipedia.org/wiki/Data_URI_scheme
Dim DataURI As String = MyBarCode.ToDataUrl()
<p>Iron Barcode 具有一項非常實用的功能,允許將條形碼導出為自包含的 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 年的經驗。