데이비드 존스(Agorus)가 Iron Suite를 활용하여 새로운 효율성을 창출하는 모습을 지켜보세요.
Milan Jovanović가 IronPDF를 사용하는 모습 보기
저희 팀의 제품 시연 영상을 시청하세요.
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;
Install-Package BarCode
IronBarCode는 이미지 파일(jpeg, png, 및 jpg)에서 비트맵과 같은 다른 프로그램 형식에 이르기까지 다양한 표준 형식을 지원합니다. 또한 PDF와 같은 외부 형식을 지원하여 IronBarCode가 모든 코드베이스에 원활하게 통합되고 파일 형식 및 변수에 유연성을 제공합니다.
모든 파일 형식에 대한 바코드 리더일 뿐만 아니라, IronBarcode는 EAN8, Code128 및 Code39와 같은 모든 표준 인코딩 및 형식을 지원하는 바코드 생성기로도 사용됩니다. 바코드 생성기 설정은 단 두 줄의 코드만 필요합니다. 낮은 진입 장벽과 개발자에게 제공되는 다양한 사용자 지정 옵션으로, IronBarCode는 바코드와 관련된 모든 상황에서 최고의 선택입니다.
EAN8
Code128
Code39
먼저 IronBarCode 및 System.Drawing와 같은 필요한 라이브러리를 가져오고, BarcodeWriter를 인스턴스화하여 12345의 문자열 값과 EAN8의 형식으로 바코드를 생성합니다. 생성된 바코드를 원하는 형식의 이미지로 저장합니다. IronBarCode는 Image 및 Bitmap로 바코드를 생성하는 것을 지원하므로 여러 가지 옵션이 있습니다.
IronBarCode
System.Drawing
BarcodeWriter
12345
Image
Bitmap
위에서 볼 수 있듯이 IronBarCode를 사용하여 바코드를 생성하는 것은 단 두 줄의 코드만을 필요로 하고, 나중에 사용할 수 있도록 파일로 저장합니다. IronBarCode는 상황에 맞추어 바코드를 사용자 정의할 수 있는 다양한 옵션을 개발자에게 제공합니다.
우리는 ResizeTo 메서드를 사용하여 바코드 이미지의 높이와 너비를 전달하여 크기를 조정할 수 있습니다.
ResizeTo
위와 같이, 우리는 먼저 BarcodeReader를 인스턴스화하고, 파일 경로를 Read 메서드에 전달하여 변수를 저장하고 나중에 사용하고 바코드 객체를 조작합니다. PDF와 같은 외부 형식을 읽기 위한 특정 메서드에는 ReadPDF가 포함됩니다; 그러나, 일반 이미지 형식 및 비트맵의 경우 Read을 사용합니다.
BarcodeReader
Read
ReadPDF
IronBarCode는 표준 파일 형식에서 바코드를 스캔할 수 있도록 개발자에게 허용합니다. 그러나 개발자가 특히 바코드 파일 일괄 처리를 프로그래밍 방식으로 읽는 경우 Read 메서드의 동작을 미세 조정하고자 하는 상황이 있습니다. This is where BarcodeReaderOptions comes in. IronBarCode lets you fully customize things such as the speed at which it reads with Speed, whether multiple barcodes are expected in the file with ExpectedMultipleBarcodes, and what kind of barcodes they are with the property ExpectBarcodeTypes. 이것은 개발자들이 여러 이미지에서 바코드를 병렬로 읽기 위해 여러 스레드를 실행할 수 있게 하고, 병렬 읽기 시 사용되는 스레드의 수를 제어할 수 있게 합니다.
BarcodeReaderOptions
Speed
ExpectedMultipleBarcodes
ExpectBarcodeTypes
이것들은 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");
IronBarcode는 BarcodeReaderOptions 내에서 쉽게 적용할 수 있는 다양한 이미지 전처리 필터를 제공합니다. 이미지 판독을 개선할 수 있는 필터를 선택하세요, 예를 들어 Sharpen, 이진 임계값, Contrast와 같은. 선택한 순서대로 필터가 적용된다는 점을 기억하십시오.
Sharpen
Contrast
각 필터를 적용한 중간 이미지의 이미지 데이터를 저장하는 옵션이 있습니다. 이것은 ImageFilterCollection의 SaveAtEachIteration 속성으로 전환할 수 있습니다.
ImageFilterCollection
SaveAtEachIteration
주요 코드 예제의 핵심 포인트:
Binary Threshold
cacheAtEachIteration
true
IronBarcode에서 이미지 보정에 대해 더 알아보세요
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
이 예제에서 우리는 다양한 유형과 형식의 바코드를 생성, 크기 조정 및 저장할 수 있음을 알 수 있습니다; 아마도 코드 한 줄로도 가능합니다.
우리의 유창한 API를 사용하여, 생성된 바코드 클래스는 여백 설정, 크기 조정 및 바코드에 주석을 달 수 있습니다. 그런 다음 IronBarcode는 파일 이름으로부터 이미지 유형을 자동으로 인식하여 이미지를 저장할 수 있습니다: GIF, HTML 파일, HTML 태그, JPEG, PDF, PNG, TIFF 및 Windows 비트맵.
We also have the StampToExistingPdfPage method, which allows a barcode to be generated and stamped onto an existing PDF. 이것은 일반 PDF를 편집하거나 문서에 내부 식별 번호를 바코드를 통해 추가할 때 유용합니다.
StampToExistingPdfPage
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
이 샘플에서 우리는 바코드에 선택한 텍스트나 바코드 자체 값을 추가할 수 있으며, 대상 머신에 설치된 어떤 서체든 사용할 수 있음을 확인할 수 있습니다. 그 서체가 없을 경우, 적절한 유사한 서체가 선택됩니다. 바코드는 크기를 조정하거나 여백을 추가할 수 있으며, 바코드와 배경 모두 색상을 변경할 수 있습니다. 그런 다음 적절한 형식으로 저장할 수 있습니다.
코드의 마지막 몇 줄에서, 우리 플루언트 스타일 연산자를 사용하여 몇 줄의 코드만으로 바코드를 생성하고 스타일링하는 것이 가능하다는 것을 볼 수 있으며, System.Linq와 유사합니다.
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();
IronBarcode에는 바코드를 이미지 자산이 없는 자립형 HTML로 내보내는 매우 유용한 기능이 있습니다. 모든 것이 HTML 파일 내에 포함됩니다.
HTML 파일, HTML 이미지 태그 또는 데이터 URI로 내보낼 수 있습니다.
이 예시에서는 다음과 같습니다.
BarcodeWriter.CreateBarcode
ToHtmlTag()
<img>
ToDataUri()
SaveAsHtmlFile()
제품, 통합 또는 라이선스 관련 문의 사항이 있으시면 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에서 바코드 유형을 읽는 것이 이제 매우 간편해졌습니다.
단 몇 줄의 코드로 몇 분 만에 시작할 수 있습니다. .NET Core, .NET Standard 및 Framework용으로 개발된 이 소프트웨어는 사용하기 쉬운 단일 DLL이며, 종속성 없이 32비트 및 64비트를 지원하고 모든 .NET 언어로 개발할 수 있습니다. 웹, 클라우드, 데스크톱 또는 콘솔 애플리케이션에 사용할 수 있으며 모바일 및 데스크톱 장치를 모두 지원합니다. 이 링크 에서 소프트웨어를 다운로드할 수 있습니다.
.NET용으로 제작되었습니다. C#, QR 코드
IronBarcode는 다양한 바코드 유형과 형식의 생성, 크기 조정 및 저장을 간편하게 해주므로 지금 바로 사용해 보지 않을 이유가 없습니다! Fluent API를 사용하면 생성된 바코드 클래스를 이용하여 여백 설정, 크기 조정, 주석 추가 등을 할 수 있습니다. 그런 다음 IronOCR을 통해 파일 이름에서 이미지 형식을 자동으로 인식하여 GIF, HTML 파일, HTML 태그, JPEG, PNG, TIFF, Windows 비트맵 등 다양한 형식으로 이미지를 저장할 수 있습니다. StampToExistingPdfPage 메서드를 사용하면 기존 PDF에 바코드를 생성하여 삽입할 수 있습니다. 이 메서드는 일반 PDF를 편집하거나 바코드를 통해 문서에 내부 식별 번호를 추가할 때 유용합니다. 24시간 연중무휴 실시간 상담원 지원을 지금 바로 받으세요. 질문이 있거나 프로젝트 지원이 필요한 경우, 30일 무료 체험판을 이용하거나, 이해하기 쉬운 영어로 작성된 풍부한 자료실을 활용하거나, $749부터 시작하는 평생 라이선스를 구매하세요.
커뮤니티 개발 라이선스는 무료입니다 . 상업용 라이선스는 749달러부터 시작합니다.
C# .NET 바코드 QR
Frank가 C# .NET 바코드 애플리케이션에서 IronBarcode를 사용하여 스캔 이미지, 사진 및 PDF 문서에서 바코드를 읽는 방법을 살펴보세요...
C# .NET 바코드
프란체스카는 C# 또는 VB 애플리케이션에서 바코드를 이미지로 변환하는 몇 가지 팁과 요령을 공유합니다. IronBarcode를 사용하여 바코드를 작성하는 방법과 사용 가능한 모든 옵션을 확인해 보세요.
QR .NET C# VB
제니의 팀은 IronBarcode를 사용하여 하루에 수천 개의 QR 코드를 생성합니다. IronBarcode를 최대한 활용하는 방법에 대한 그들의 튜토리얼을 확인해 보세요.
Iron Software의 팀은 .NET 소프트웨어 구성 요소 시장에서 10년 이상의 경험을 보유하고 있습니다.
개발팀과 직접 소통하세요.
이해하기 쉬운 영어로 작성된 명확한 온라인 설명서.
무료 개발 라이선스. 상업용 라이선스는 $749부터.
NuGet 또는 DLL을 사용하여 몇 분 안에 시작하세요.
신용카드 필요 없음
임상시험 신청서가 제출되었습니다. 성공적으로 . 체험판 키는 이메일에 포함되어 있습니다. 그렇지 않다면 연락주시기 바랍니다. support@ironsoftware.com
체험판 키는 이메일에 포함되어 있습니다. 그렇지 않다면 연락주시기 바랍니다. support@ironsoftware.com
워터마크 없이 실제 운영 환경에서 테스트해 보세요. 필요한 곳 어디에서든 작동합니다.
모든 기능을 갖춘 제품을 30일 동안 사용해 보세요. 몇 분 안에 설치를 완료하고 작동시킬 수 있습니다.
제품 체험 기간 동안 당사 지원 엔지니어링 팀에 대한 모든 접근 권한을 확보할 수 있습니다.
저희 제품의 주요 기능을 보여주는 라이브 데모입니다.
프로젝트별 기능 추천을 받아보세요
모든 질문에 답변하여 필요한 모든 정보를 제공합니다. (어떠한 약속도 없습니다.)
체험 라이센스 키를 이메일에서 확인하세요.
이메일을 받지 못하셨다면, 라이브 채팅을 시작하거나 support@ironsoftware.com으로 이메일을 보내세요
부담 없는 상담을 예약하세요
아래 양식을 작성하시거나 sales@ironsoftware.com으로 이메일을 보내주세요.
고객님의 정보는 항상 비밀로 유지됩니다.
30분간 진행되는 개인 데모를 예약하세요.
계약도 없고, 카드 정보도 필요 없고, 아무런 의무도 없습니다.
저작권 © Iron Software 2013-2026