在实际环境中测试
在生产中测试无水印。
随时随地为您服务。
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-36-49c-36-49">条码读取器和条码生成器在C#中</h2> <ol> <li> <p>var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8);</p> </li> <li> <p>图像 myBarcodeImage = myBarcode.图像;</p> </li> <li> <p>myBarcode.ResizeTo(400, 100);</p> </li> <li> <p>var resultFromFile = BarcodeReader.Read(@"file/barcode.png");</p> </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-49">高级条码写入器</h4> <p>如上所见,使用IronBarcode生成条形码仅需两行代码,并将其保存为文件以便日后使用。 IronBarcode 通过为开发人员提供大量选项来进一步扩展此功能,以自定义条形码以适应不同的情况。</p> <p>我们可以使用<code>ResizeTo</code>方法并传入高度和宽度来调整条形码图像的大小。</p> <h3 id="anchor-barcode-36-49">BarCode 阅读器</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>GIFs、HTML文件、HTML标签、JPEGs、PDFs、PNGs、TIFFs和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 枚举中的任何类型的条码。它可以在 .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还能够紧凑地编码更大的数据集。
一维条形码并不止于此。
汽车和国防行业使用Code 39条形码。其名称说明了它能够编码39个字符(现已修订为43个)。类似地,Code 128字符集具有高数据密度。继续在物流方面,包装行业更喜欢使用ITF(交错2 of 5)条形码来标记包装材料,如瓦楞纸板,因为它们具有高打印容差。而MSI条形码则更适合产品识别和库存管理。
制药行业使用制药二进制代码。RSS 14(减少空间符号)和Databar条形码是1D和2D条形码的混合。它是标记小物件的医疗保健最爱。类似于Code 128条形码,Codabar也是物流和医疗保健的最爱。它无需计算机工作,可以从点阵打印机输出中读取。
二维条码包括Aztec, Data Matrix, Data Bar, IntelligentMail, Maxicode, QR code。在不同的行业中使用,Aztec在运输行业的票据和登机牌上使用,具有在低分辨率下的可读性。虽然IntelligentMail仅限于美国邮件的特定用途,但Maxicode用于标准化货物追踪。
最广为人知的条形码是二维码。由于其灵活性、容错能力、可读性以及对各种数据的支持,如数字、字母数字、字节/二进制和汉字,它在B2B到B2C之间有着广泛的用途。
一旦确定类型,IronBarcode - 领先的条形码生成器将接管!
在 .NET 中读取条形码类型,现在使用 IronBarcode 的多功能、高级和高效库变得轻而易举。
由于IronBarcode能够创建、调整大小和保存各种条形码类型和格式,没有理由不立即开始使用它!
使用Fluent API,通过生成的条码类设置边距、调整大小和注释条码。然后使用IronOCR自动根据文件名假定正确的图像类型保存为图像。无论是GIF、HTML文件、HTML标签、JPEG、PNG、TIFF还是Windows位图。
StampToExistingPdfPage方法允许生成条形码并将其盖在现有的PDF上。这在编辑通用PDF或通过条形码向文档添加内部识别号码时非常有用。
立即联系24/7真人支持。无论您有问题还是需要项目支持;从我们的30天试用密钥开始,从我们易于理解的英语广泛文档资源中受益,或者从我们起价$749的终身许可中受益。
C# .NET 条形码 QR
C# .NET 条形码
Francesca 分享了一些在 C# 或 VB 应用程序中将条形码写入图像的技巧和窍门。了解如何编写条形码以及使用 IronBarcode 可用的所有选项...
查看弗朗西斯卡的条形码教程QR .NET C# VB
Jenny的团队每天使用IronBarcode编写成千上万个二维码。查看他们的教程,了解如何充分利用IronBarcode ...
Jenny团队的QR编写教程Iron的团队在.NET软件组件市场拥有超过10年的经验。