워터마크 없이 실제 운영 환경에서 테스트해 보세요.
필요한 곳 어디에서든 작동합니다.
모든 기능을 갖춘 제품을 30일 동안 사용해 보세요.
몇 분 안에 설치를 완료하고 작동시킬 수 있습니다.
제품 체험 기간 동안 당사 지원 엔지니어링 팀에 대한 모든 접근 권한을 확보할 수 있습니다.
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
Install-Package BarCode
IronBarcode는 이미지 파일(jpeg, png 및 jpg)부터 변수 전달을 원하는 경우의 비트맵과 같은 점진적 형식에 이르기까지 다양한 표준 형식을 지원합니다. 게다가 PDF 등의 외부 형식도 지원하여 IronBarcode가 모든 코드베이스에 원활하게 통합되도록 하여 개발자에게 파일 형식과 변수에 대한 유연성을 제공합니다.
IronBarcode는 모든 파일 형식의 BARCODE 리더일 뿐만 아니라, EAN8, Code128, Code39와 같은 모든 표준 인코딩 및 서식을 지원하는 BARCODE 생성기 역할도 합니다. 바코드 생성기 설정은 단 두 줄의 코드만 필요합니다. 개발자를 위한 많은 커스터마이징 옵션과 낮은 진입 장벽을 가진 IronBarcode는 바코드 관련 모든 상황에서 최고의 선택입니다.
먼저 IronBarCode 및 System.Drawing와 같은 필수 라이브러리를 임포트하고, BarcodeWriter를 인스턴스화하여 12345의 문자열 값을 EAN8 형식으로 BARCODE로 생성합니다. 생성된 바코드를 원하는 형식의 이미지로 저장합니다. IronBarcode는 Image 및 Bitmap 형식의 BARCODE 생성을 모두 지원하므로, 이에 대한 다양한 옵션이 있습니다.
위에서 보았듯이, IronBarcode를 사용하면 바코드를 생성하는 데 두 줄의 코드만 필요하고 이후 사용을 위해 파일로 저장할 수 있습니다. IronBarcode는 개발자에게 상황에 맞는 바코드를 커스터마이즈할 수 있는 다양한 옵션을 제공합니다.
ResizeTo 메서드를 사용하고 높이와 너비를 전달하여 BarCode 이미지의 크기를 조정할 수 있습니다.
위와 같이, 먼저 BarcodeReader를 인스턴스화하고, Read 메서드에 파일 경로를 전달한 다음, 나중에 BARCODE 객체를 조작할 때 사용할 수 있도록 변수에 저장합니다. ReadPDF을 사용하여 PDF와 같은 외부 형식을 읽는 데 사용되는 지정된 메서드가 있습니다; 단, 일반적인 이미지 형식 및 비트맵의 경우 Read을 사용합니다.
IronBarcode는 개발자가 표준 파일 형식에서 바코드를 스캔할 수 있도록 합니다. 그러나 개발자가 BarcodeReaderOptions 메서드의 동작을 미세 조정하고자 하는 경우가 있으며, 특히 프로그래밍 방식으로 일괄 BarCode 파일을 읽는 경우 그러합니다. 이때 BarcodeReaderOptions가 필요합니다. IronBarcode를 사용하면 Speed을 통해 판독 속도, ExpectedMultipleBarcodes을 통해 파일에 여러 BarCode가 포함될지 여부, 그리고 ExpectBarcodeTypes 속성을 통해 BarCode의 종류 등을 완전히 사용자 지정할 수 있습니다. 이는 개발자가 여러 이미지를 병렬로 읽기 위한 여러 스레드를 실행하고 병렬 읽기를 수행할 때 사용할 스레드 수를 제어하도록 합니다.
이것들은 IronBarcode의 강력함을 보여주는 몇 가지 속성들에 불과합니다. 전체 목록은 여기에서 문서를 참조하세요.
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 내에서 쉽게 적용할 수 있는 다양한 이미지 전처리 필터를 제공합니다. Sharpen, Binary Threshold, Contrast 등과 같이 이미지 가독성을 높일 수 있는 필터를 선택하십시오. 선택한 순서대로 필터가 적용된다는 점을 기억하십시오.
각 필터를 적용한 중간 이미지의 이미지 데이터를 저장하는 옵션이 있습니다. 이는 SaveAtEachIteration의 ImageFilterCollection 속성을 사용하여 전환할 수 있습니다.
주요 코드 예제의 핵심 포인트:
BarcodeReaderOptions의 인스턴스를 생성하고 Sharpen, Binary Threshold, Contrast 등 다양한 이미지 필터를 적용하여 구성합니다.cacheAtEachIteration을 true로 설정하면, 라이브러리는 각 필터 적용 후 중간 이미지를 저장하며, 이는 디버깅 및 분석에 유용합니다.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를 사용하면 생성된 barcode 클래스를 통해 여백 설정, 크기 조정 및 BARCODE 주석 달기가 가능합니다. 그런 다음 IronBarcode는 파일 이름으로부터 이미지 유형을 자동으로 인식하여 이미지를 저장할 수 있습니다: GIF, HTML 파일, HTML 태그, JPEG, PDF, PNG, TIFF 및 Windows 비트맵.
또한 기존 PDF에 BarCode를 생성하여 삽입할 수 있는 StampToExistingPdfPage 메서드도 제공합니다. 이것은 일반 PDF를 편집하거나 문서에 내부 식별 번호를 바코드를 통해 추가할 때 유용합니다.
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");
// 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.
Dim 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")
' 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 = 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
이 예시에서 볼 수 있듯이, BARCODE에는 사용자가 선택한 텍스트나 barcode 자체의 값을 대상 컴퓨터에 설치된 임의의 서체를 사용하여 주석으로 추가할 수 있습니다. 해당 서체가 없는 경우, 적절한 유사 서체가 선택됩니다. BarCode의 크기를 조정하거나 여백을 추가할 수 있으며, barcode 및 배경색을 변경할 수 있습니다. 그런 다음 적절한 형식으로 저장할 수 있습니다.
마지막 몇 줄의 코드에서 볼 수 있듯이, 유연한 스타일 연산자를 사용하면 barcode과 같은 요소를 단 몇 줄의 코드로 생성하고 스타일을 지정할 수 있으며, 이는 System.Linq과 유사합니다.
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을 사용하여 입력 데이터와 인코딩 유형을 지정하여 BARCODE를 생성합니다.ToHtmlTag()는 웹 페이지에 삽입할 수 있는 HTML <img> 태그를 생성합니다.ToDataUri()은 <img> 태그의 소스로 사용되거나 이미지 URL이 필요한 거의 모든 곳에서 사용할 수 있는 데이터 URI 문자열을 생성합니다.SaveAsHtmlFile()은 BARCODE를 모든 이미지 데이터가 인라인으로 포함된 독립형 HTML 파일로 저장하여, 휴대성이 뛰어나고 공유하기 쉽게 만듭니다.
제품, 통합 또는 라이선스 관련 문의 사항이 있으시면 Iron 제품 개발팀이 언제든지 지원해 드립니다. 지금 바로 Iron에 연락하여 프로젝트에 Iron 라이브러리를 최대한 활용하는 방법을 알아보세요.
질문하기IronBarcode .NET 바코드 라이브러리는 BarcodeEncoding 열거형에 속하는 모든 유형의 바코드를 읽습니다. .NET Core, .NET Standard 및 .NET Framework 환경에서 바코드를 인식합니다.
재고 관리 워크플로의 시간 절약 및 효율성 향상을 위해 IronBarcode는 UPC 및 EAN 코드와 같은 전통적이고 검증된 바코드 유형을 포함한 1차원(1D) 또는 선형 바코드를 권장합니다. 전 세계 판매 시점(POS) 서비스에서는 일반적으로 UPC(Universal Product Code) 바코드(UPC-A 및 UPC-E 변형 포함)를 사용합니다. 이는 창고 및 계산대에서 제품 특성을 쉽게 식별하고 추적할 수 있도록 하여 소비자에게 이점을 제공합니다. UPC-A는 12~13자리 숫자만 사용할 수 있는 반면, UPC-E는 8~13자리 숫자를 지원합니다.
UPC와 마찬가지로 유럽 시장에서는 판매 시점 스캔을 위해 소비재에 EAN 바코드를 사용합니다. EAN 바코드의 변형으로는 EAN-13이 기본값으로 사용되며, EAN-8은 사탕과 같이 포장 공간이 제한적인 경우에 사용됩니다. EAN-13은 고밀도 바코드로서 유연성이 뛰어날 뿐만 아니라 더 많은 데이터를 효율적으로 저장할 수 있습니다.
1D 바코드의 활용 범위는 여기서 끝나지 않습니다.
자동차 및 방위 산업에서는 코드 39 바코드를 사용합니다. 이 바코드의 이름에서 알 수 있듯이 39개의 문자(현재는 43개로 개정됨)를 인코딩할 수 있습니다. 마찬가지로 코드 128 바코드도 39개의 문자와 높은 데이터 밀도를 특징으로 합니다. 물류 분야로 넘어가서, 포장 산업에서는 골판지와 같은 포장재에 라벨을 부착할 때 높은 인쇄 허용 오차 때문에 ITF(Interleaved 2 of 5) 바코드를 선호합니다. 반면 MSI 바코드는 제품 식별 및 재고 관리에 주로 사용됩니다.
제약 업계에서는 제약용 바이너리 코드(Pharmaceutical Binary Code, PBC)를 사용합니다. RSS 14(Reduced Space Symbologies, 축소 공간 심볼) 및 데이터바 바코드는 1차원과 2차원 바코드가 혼합된 형태입니다. 의료 분야에서는 소형 물품에 표시하기 위해 널리 사용됩니다. 코드 128 바코드와 마찬가지로 데이터바 바코드도 물류 및 의료 분야에서 선호됩니다. 컴퓨터 없이 도트 매트릭스 프린터 출력물에서 판독할 수 있습니다.
2D 바코드에는 Aztec, Data Matrix, Data Bar, IntelligentMail, Maxicode, QR 코드 등이 있습니다. 다양한 산업 분야에서 사용되는 Aztec 바코드는 교통 산업에서 티켓 및 탑승권에 사용되며, 낮은 해상도에서도 판독이 가능합니다. IntelligentMail은 미국 우편 서비스에서 특정 용도로 제한적으로 사용되는 반면, Maxicode는 배송 추적을 표준화하는 데 활용됩니다.
바코드 중에서 가장 널리 알려진 것은 QR 코드입니다. QR 코드는 유연성, 오류 허용성, 가독성, 숫자, 영숫자, 바이트/이진 데이터, 한자 등 다양한 데이터 지원 덕분에 B2B에서 B2C에 이르기까지 다양한 용도로 사용됩니다.
바코드 유형이 확정되면, 업계 최고의 바코드 생성기인 IronBarcode가 나머지 작업을 처리합니다!
IronBarcode의 다재다능하고 고급스러우며 효율적인 라이브러리를 사용하면 .NET에서 바코드 유형을 읽는 것이 이제 매우 간편해졌습니다.
IronBarcode는 다양한 바코드 유형과 형식의 생성, 크기 조정 및 저장을 간편하게 해주므로 지금 바로 사용해 보지 않을 이유가 없습니다!
Fluent API를 사용하면 생성된 바코드 클래스를 이용하여 여백 설정, 크기 조정, 주석 추가 등을 할 수 있습니다. 그런 다음 IronOCR을 통해 파일 이름에서 이미지 형식을 자동으로 인식하여 GIF, HTML 파일, HTML 태그, JPEG, PNG, TIFF, Windows 비트맵 등 다양한 형식으로 이미지를 저장할 수 있습니다.
StampToExistingPdfPage 메서드를 사용하면 기존 PDF에 바코드를 생성하여 삽입할 수 있습니다. 이 메서드는 일반 PDF를 편집하거나 바코드를 통해 문서에 내부 식별 번호를 추가할 때 유용합니다.
24시간 연중무휴 실시간 상담원 지원을 지금 바로 받으세요. 질문이 있거나 프로젝트 지원이 필요한 경우, 30일 무료 체험판을 이용하거나, 이해하기 쉬운 영어로 작성된 풍부한 자료실을 활용하거나, $749부터 시작하는 평생 라이선스를 구매하세요.
C# .NET 바코드 QR
Frank가 C# .NET 바코드 애플리케이션에서 IronBarcode를 사용하여 스캔 이미지, 사진 및 PDF 문서에서 바코드를 읽는 방법을 살펴보세요...
프랭크의 바코드 판독 튜토리얼을 시청하세요
C# .NET 바코드
프란체스카는 C# 또는 VB 애플리케이션에서 바코드를 이미지로 변환하는 몇 가지 팁과 요령을 공유합니다. IronBarcode를 사용하여 바코드를 작성하는 방법과 사용 가능한 모든 옵션을 확인해 보세요.
프란체스카의 바코드 튜토리얼을 참조하세요.
QR .NET C# VB
제니의 팀은 IronBarcode를 사용하여 하루에 수천 개의 QR 코드를 생성합니다. IronBarcode를 최대한 활용하는 방법에 대한 그들의 튜토리얼을 확인해 보세요.
제니 팀의 QR 코드 작성 튜토리얼
아이언의 팀은 .NET 소프트웨어 구성 요소 시장에서 10년 이상의 경험을 보유하고 있습니다.