푸터 콘텐츠로 바로가기
동영상

C#에서 바코드 데이터 형식을 출력하는 방법 | IronBarcode

Neodynamic Barcode에서 IronBarcode로의 마이그레이션

이 가이드는 Neodynamic.SDK.BarcodeNeodynamic.SDK.BarcodeReader에서 IronBarcode로의 완전한 마이그레이션 경로를 제공합니다. 이 문서에는 네오다이나믹 패키지 두 가지 모두의 제거, 이중 라이선스 구성을 단일 키로 대체, 생성 및 읽기 API 호출 번역, 그리고 네오다이나믹 제품군으로는 불가능했던 2D 바코드 읽기 기능 확보 과정이 포함되어 있습니다. 이 가이드는 기존 네오다이나믹 코드를 보유하고 있으며 마이그레이션을 체계적인 파일별 접근 방식으로 완료해야 하는 개발자를 위해 작성되었습니다.

네오다이내믹 바코드에서 마이그레이션해야 하는 이유는 무엇일까요?

2D 판독 격차: 네오다이나믹 바코드 Professional SDK는 QR 코드, DataMatrix, PDF417 및 Aztec 바코드를 생성합니다. 이러한 형식은 함께 제공되는 바코드 리더 SDK에서 읽을 수 없습니다. 제품 라벨, 배송 용기 또는 문서 추적을 위한 QR 코드를 생성하는 프로젝트는 해당 생성기와 함께 구매한 리더기를 통해 생성된 QR 코드를 다시 읽을 수 없습니다.IronBarcode동일한 라이브러리와 라이선스를 통해 QR 코드, DataMatrix, PDF417, Aztec 및 기타 지원되는 모든 2D 형식을 읽고 생성합니다.

이중 제품 부하: Neodynamic SDK를 사용하는 모든 프로젝트는 두 PackageReference 항목, 두 using 지시문, 두 개의 라이선스 블록 및 별도의 두 개의 업데이트 주기를 가지고 있습니다. 이러한 오버헤드는 모든 개발자 컴퓨터, 모든 CI 파이프라인, 그리고 모든 프로덕션 환경에서 반복적으로 발생합니다. 유지 관리 요구 사항이 각각 다른 두 패키지를 단일 라이선스를 사용하는 단일 종속성으로 통합하는 것이 이번 마이그레이션의 기계적인 결과입니다.

세 번째 라이브러리 문제: 2D 읽기 기능에 대한 격차를 발견하고 마이그레이션 대신 해결책을 선택한 팀은 일반적으로 QR 코드 읽기를 위해 세 번째 라이브러리(가장 흔한 선택은 ZXing .NET) 를 추가했습니다. 그러한 결정은 하나의 제약을 감수하는 대신 다른 복잡성을 야기합니다. 즉, 바코드 관련 종속성이 세 가지나 존재하게 되는데, 각 종속성은 고유한 버전 제약 조건, 릴리스 노트, 그리고 .NET 런타임이나 종속 프레임워크가 업데이트될 때 발생할 수 있는 충돌 가능성을 가지고 있습니다.IronBarcode이 세 가지를 모두 대체합니다.

가격 복잡성: 네오다이나믹 바코드 Professional SDK는 개발자당 가격이 책정되어 있습니다(약 $352부터 시작하는 Basic, 약 $705부터 시작하는 Ultimate의 경우 ComponentSource를 통해 구입 가능). Barcode Reader SDK는 별도의 비용이 들며, 생성 및 1D 읽기가 모두 필요한 프로젝트는 둘 다 구입해야 하며 팀 크기와 함께 Reader 비용에 따라 가격이 증가합니다. 2D 읽기가 필요한 프로젝트는 Neodynamic 제품군 내에서 어떤 가격으로도 그 요구를 충족할 수 없습니다.IronBarcode Lite는 생성 및 읽기 — 1D 및 2D — 를 단일 라이선스로 포함합니다. 현재 가격은 IronBarcode 라이선스 페이지에 있습니다.

근본적인 문제

완전한 바코드 워크플로우를 위해 Neodynamic SDK를 모두 사용하는 모든 코드베이스의 핵심 문제는 QR 코드 읽기가 불가능하다는 것이었습니다.

// Before: 네오다이나믹 바코드 리더 does not support QR codes
using Neodynamic.SDK.BarcodeReader;
using System.Drawing;

public string ReadQrCode(string imagePath)
{
    using var bitmap = new Bitmap(imagePath);
    var reader = new BarcodeReader();
    var results = reader.Read(bitmap);

    // Results are always null or empty for 2D barcodes
    if (results == null || !results.Any())
    {
        throw new NotSupportedException(
            "Neodynamic Barcode Reader does not support QR codes");
    }

    return results.First().Value;
}
// Before: 네오다이나믹 바코드 리더 does not support QR codes
using Neodynamic.SDK.BarcodeReader;
using System.Drawing;

public string ReadQrCode(string imagePath)
{
    using var bitmap = new Bitmap(imagePath);
    var reader = new BarcodeReader();
    var results = reader.Read(bitmap);

    // Results are always null or empty for 2D barcodes
    if (results == null || !results.Any())
    {
        throw new NotSupportedException(
            "Neodynamic Barcode Reader does not support QR codes");
    }

    return results.First().Value;
}
Imports Neodynamic.SDK.BarcodeReader
Imports System.Drawing

Public Function ReadQrCode(imagePath As String) As String
    Using bitmap As New Bitmap(imagePath)
        Dim reader As New BarcodeReader()
        Dim results = reader.Read(bitmap)

        ' Results are always null or empty for 2D barcodes
        If results Is Nothing OrElse Not results.Any() Then
            Throw New NotSupportedException("Neodynamic Barcode Reader does not support QR codes")
        End If

        Return results.First().Value
    End Using
End Function
$vbLabelText   $csharpLabel

IronBarcode 로 마이그레이션한 후에는 동일한 작업이 형식별 처리가 없는 표준 읽기 호출로 변경됩니다.

// After:IronBarcode reads QR codes with the same call used for all formats
using IronBarCode;

public string ReadQrCode(string imagePath)
{
    var result = BarcodeReader.Read(imagePath).FirstOrDefault();
    return result?.Value;
}
// After:IronBarcode reads QR codes with the same call used for all formats
using IronBarCode;

public string ReadQrCode(string imagePath)
{
    var result = BarcodeReader.Read(imagePath).FirstOrDefault();
    return result?.Value;
}
Imports IronBarCode

Public Function ReadQrCode(imagePath As String) As String
    Dim result = BarcodeReader.Read(imagePath).FirstOrDefault()
    Return If(result?.Value, Nothing)
End Function
$vbLabelText   $csharpLabel

2D 바코드 판독을 참조하는 모든 throw new NotSupportedException(...) 플레이스홀더는 이 마이그레이션 동안 제거되고 실제 판독 호출로 대체됩니다.

IronBarcode와 네오다이나믹 바코드: 기능 비교

기능 네오다이나믹 바코드 Professional 네오다이나믹 바코드 리더 IronBarcode
코드 128, EAN-13, UPC-A 생성 해당 없음
QR 코드, DataMatrix, PDF417 생성 해당 없음
1D 바코드 판독 해당 없음
QR 코드 읽기 해당 없음 아니요
데이터매트릭스 읽기 해당 없음 아니요
PDF417 읽기 해당 없음 아니요
PDF 바코드 읽기 기본 제공 아니요 아니요
자동 형식 감지 해당 없음 아니요
NuGet 패키지가 필요합니다. 1 1 1 (둘 다 포함)
라이선스 키가 필요합니다 1 1 (별도) 1 (모두 포함)
System.Drawing 종속성 아니요
Linux/Docker 지원 제한적 제한적
.NET 8 / .NET 9 지원 제한적
비동기 배치 읽기 아니요 아니요

빠른 시작: 네오다이나믹 바코드에서IronBarcode로의 마이그레이션

1단계: Neodynamic 패키지 두 개를 모두 제거합니다.

두 패키지 모두 제거해야 합니다. 삭제 순서에 영향을 미치는 공통 종속성이 없습니다.

dotnet remove package Neodynamic.SDK.Barcode
dotnet remove package Neodynamic.SDK.BarcodeReader
dotnet remove package Neodynamic.SDK.Barcode
dotnet remove package Neodynamic.SDK.BarcodeReader
SHELL

후속 진행 전에 .csproj 파일에서 두 항목이 모두 사라졌는지 확인하세요.

2단계:IronBarcode추가

dotnet add package IronBarcode
dotnet add package IronBarcode
SHELL

3단계: 이중 라이선스 구성 교체

Neodynamic 라이선스 블록 두 개를 모두 제거하고IronBarcode키 할당 하나로 대체하십시오. 이 할당은 애플리케이션 시작 시 한 번 이루어지며, Program.cs, Startup.cs, 또는 애플리케이션의 구성 루트에 있습니다:

// Before: two license blocks, two products
using Neodynamic.SDK.Barcode;
using Neodynamic.SDK.BarcodeReader;

BarcodeProfessional.LicenseOwner = "Your Company";
BarcodeProfessional.LicenseKey = "GEN-LICENSE-KEY";

Neodynamic.SDK.BarcodeReader.BarcodeReader.LicenseOwner = "Your Company";
Neodynamic.SDK.BarcodeReader.BarcodeReader.LicenseKey = "READ-LICENSE-KEY";
// Before: two license blocks, two products
using Neodynamic.SDK.Barcode;
using Neodynamic.SDK.BarcodeReader;

BarcodeProfessional.LicenseOwner = "Your Company";
BarcodeProfessional.LicenseKey = "GEN-LICENSE-KEY";

Neodynamic.SDK.BarcodeReader.BarcodeReader.LicenseOwner = "Your Company";
Neodynamic.SDK.BarcodeReader.BarcodeReader.LicenseKey = "READ-LICENSE-KEY";
Imports Neodynamic.SDK.Barcode
Imports Neodynamic.SDK.BarcodeReader

BarcodeProfessional.LicenseOwner = "Your Company"
BarcodeProfessional.LicenseKey = "GEN-LICENSE-KEY"

Neodynamic.SDK.BarcodeReader.BarcodeReader.LicenseOwner = "Your Company"
Neodynamic.SDK.BarcodeReader.BarcodeReader.LicenseKey = "READ-LICENSE-KEY"
$vbLabelText   $csharpLabel
// After: one key covers generation and reading across all formats
using IronBarCode;

IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY";
// After: one key covers generation and reading across all formats
using IronBarCode;

IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY";
Imports IronBarCode

' After: one key covers generation and reading across all formats
IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY"
$vbLabelText   $csharpLabel

네오다이나믹 라이선스 키가 저장된 모든 구성 파일, 환경 변수 또는 비밀 저장소는 마이그레이션이 검증된 후 더 이상 사용하지 않아도 됩니다.

코드 마이그레이션 예제

코드 128 바코드 생성

신역동적 접근법:

using Neodynamic.SDK.Barcode;
using System.Drawing.Imaging;

public void GenerateCode128(string data, string outputPath)
{
    var barcode = new BarcodeProfessional();
    barcode.Code = data;
    barcode.Symbology = Symbology.Code128;
    barcode.BarcodeUnit = BarcodeUnit.Pixel;

    System.Drawing.Image image = barcode.GetBarcodeImage();
    image.Save(outputPath, ImageFormat.Png);
}
using Neodynamic.SDK.Barcode;
using System.Drawing.Imaging;

public void GenerateCode128(string data, string outputPath)
{
    var barcode = new BarcodeProfessional();
    barcode.Code = data;
    barcode.Symbology = Symbology.Code128;
    barcode.BarcodeUnit = BarcodeUnit.Pixel;

    System.Drawing.Image image = barcode.GetBarcodeImage();
    image.Save(outputPath, ImageFormat.Png);
}
Imports Neodynamic.SDK.Barcode
Imports System.Drawing.Imaging

Public Sub GenerateCode128(data As String, outputPath As String)
    Dim barcode As New BarcodeProfessional()
    barcode.Code = data
    barcode.Symbology = Symbology.Code128
    barcode.BarcodeUnit = BarcodeUnit.Pixel

    Dim image As System.Drawing.Image = barcode.GetBarcodeImage()
    image.Save(outputPath, ImageFormat.Png)
End Sub
$vbLabelText   $csharpLabel

IronBarcode 접근 방식:

using IronBarCode;

public void GenerateCode128(string data, string outputPath)
{
    BarcodeWriter.CreateBarcode(data, BarcodeEncoding.Code128)
        .SaveAsPng(outputPath);
}
using IronBarCode;

public void GenerateCode128(string data, string outputPath)
{
    BarcodeWriter.CreateBarcode(data, BarcodeEncoding.Code128)
        .SaveAsPng(outputPath);
}
Imports IronBarCode

Public Sub GenerateCode128(data As String, outputPath As String)
    BarcodeWriter.CreateBarcode(data, BarcodeEncoding.Code128) _
        .SaveAsPng(outputPath)
End Sub
$vbLabelText   $csharpLabel

System.Drawing.Imaging 임포트가 더 이상 필요하지 않습니다. BarcodeInfo 인스턴스와 해당 속성 할당이 단일 메서드 호출로 통합됩니다. 크기, 주석 및 출력 형식 옵션에 대한 자세한 내용은 1D 바코드 생성 가이드를 참조하십시오.

QR 코드 생성하기

신역동적 접근법:

using Neodynamic.SDK.Barcode;

public void GenerateQrCode(string data, string outputPath)
{
    var barcode = new BarcodeProfessional();
    barcode.Code = data;
    barcode.Symbology = Symbology.QRCode;
    barcode.QRCodeECL = QRCodeErrorCorrectionLevel.H;

    barcode.GetBarcodeImage().Save(outputPath, System.Drawing.Imaging.ImageFormat.Png);
}
using Neodynamic.SDK.Barcode;

public void GenerateQrCode(string data, string outputPath)
{
    var barcode = new BarcodeProfessional();
    barcode.Code = data;
    barcode.Symbology = Symbology.QRCode;
    barcode.QRCodeECL = QRCodeErrorCorrectionLevel.H;

    barcode.GetBarcodeImage().Save(outputPath, System.Drawing.Imaging.ImageFormat.Png);
}
Imports Neodynamic.SDK.Barcode
Imports System.Drawing.Imaging

Public Sub GenerateQrCode(data As String, outputPath As String)
    Dim barcode As New BarcodeProfessional()
    barcode.Code = data
    barcode.Symbology = Symbology.QRCode
    barcode.QRCodeECL = QRCodeErrorCorrectionLevel.H

    barcode.GetBarcodeImage().Save(outputPath, ImageFormat.Png)
End Sub
$vbLabelText   $csharpLabel

IronBarcode 접근 방식:

using IronBarCode;

public void GenerateQrCode(string data, string outputPath)
{
    QRCodeWriter.CreateQrCode(data, 500, QRCodeWriter.QrErrorCorrectionLevel.Highest)
        .SaveAsPng(outputPath);
}
using IronBarCode;

public void GenerateQrCode(string data, string outputPath)
{
    QRCodeWriter.CreateQrCode(data, 500, QRCodeWriter.QrErrorCorrectionLevel.Highest)
        .SaveAsPng(outputPath);
}
Imports IronBarCode

Public Sub GenerateQrCode(data As String, outputPath As String)
    QRCodeWriter.CreateQrCode(data, 500, QRCodeWriter.QrErrorCorrectionLevel.Highest) _
        .SaveAsPng(outputPath)
End Sub
$vbLabelText   $csharpLabel

세대 변환은 API 표면만 변경합니다. 이번 마이그레이션으로 인한 결정적인 차이점은 이제 동일한 애플리케이션이 동일한IronBarcode라이브러리와 라이선스를 통해 자신이 생성한 QR 코드도 읽을 수 있다는 것입니다. 2D 바코드 생성에 대한 자세한 내용은 2D 바코드 생성 가이드를 참조하십시오.

1D 바코드 읽기

신역동적 접근법:

using Neodynamic.SDK.BarcodeReader;
using System.Drawing;

public string[] Read1DBarcodes(string imagePath)
{
    using var bitmap = new Bitmap(imagePath);
    var reader = new BarcodeReader();
    var results = reader.Read(bitmap);
    return results?.Select(r => r.Value).ToArray() ?? Array.Empty<string>();
}
using Neodynamic.SDK.BarcodeReader;
using System.Drawing;

public string[] Read1DBarcodes(string imagePath)
{
    using var bitmap = new Bitmap(imagePath);
    var reader = new BarcodeReader();
    var results = reader.Read(bitmap);
    return results?.Select(r => r.Value).ToArray() ?? Array.Empty<string>();
}
Imports Neodynamic.SDK.BarcodeReader
Imports System.Drawing

Public Function Read1DBarcodes(imagePath As String) As String()
    Using bitmap As New Bitmap(imagePath)
        Dim reader As New BarcodeReader()
        Dim results = reader.Read(bitmap)
        Return If(results?.Select(Function(r) r.Value).ToArray(), Array.Empty(Of String)())
    End Using
End Function
$vbLabelText   $csharpLabel

IronBarcode 접근 방식:

using IronBarCode;

public string[] Read1DBarcodes(string imagePath)
{
    var results = BarcodeReader.Read(imagePath);
    return results.Select(r => r.Value).ToArray();
}
using IronBarCode;

public string[] Read1DBarcodes(string imagePath)
{
    var results = BarcodeReader.Read(imagePath);
    return results.Select(r => r.Value).ToArray();
}
Imports IronBarCode

Public Function Read1DBarcodes(imagePath As String) As String()
    Dim results = BarcodeReader.Read(imagePath)
    Return results.Select(Function(r) r.Value).ToArray()
End Function
$vbLabelText   $csharpLabel

Bitmap 구성과 System.Drawing 임포트가 제거됩니다.IronBarcode파일 경로를 직접 입력받습니다. 두 API에서 result.Value 속성 이름이 동일하므로 반환된 값을 처리하는 다운스트림 코드는 변경되지 않습니다. 여러 바코드를 이미지로 읽고 전처리하는 옵션에 대해서는 이미지에서 바코드 읽기 가이드 를 참조하십시오.

QR 코드 읽기 (이전에는 불가능)

신역동적 접근법:

// This method could not be implemented with Neodynamic Barcode Reader
public string ReadQrCode(string imagePath)
{
    throw new NotSupportedException(
        "Neodynamic Barcode Reader does not support QR codes");
}
// This method could not be implemented with Neodynamic Barcode Reader
public string ReadQrCode(string imagePath)
{
    throw new NotSupportedException(
        "Neodynamic Barcode Reader does not support QR codes");
}
' This method could not be implemented with Neodynamic Barcode Reader
Public Function ReadQrCode(imagePath As String) As String
    Throw New NotSupportedException("Neodynamic Barcode Reader does not support QR codes")
End Function
$vbLabelText   $csharpLabel

IronBarcode 접근 방식:

using IronBarCode;

public string ReadQrCode(string imagePath)
{
    var result = BarcodeReader.Read(imagePath).FirstOrDefault();
    return result?.Value;
}
using IronBarCode;

public string ReadQrCode(string imagePath)
{
    var result = BarcodeReader.Read(imagePath).FirstOrDefault();
    return result?.Value;
}
Imports IronBarCode

Public Function ReadQrCode(imagePath As String) As String
    Dim result = BarcodeReader.Read(imagePath).FirstOrDefault()
    Return If(result?.Value, Nothing)
End Function
$vbLabelText   $csharpLabel

2D 바코드 판독을 참조하는 모든 throw new NotSupportedException(...) 플레이스홀더가 표준 읽기 호출로 변환됩니다. 메서드 본문이 예외 발생에서 정상 작동하는 구현으로 변경됩니다. QR 코드는 특별한 취급이 필요하지 않습니다.IronBarcode형식을 자동으로 식별합니다.

PDF 문서에서 바코드 읽기 (새로운 기능)

신역동적 접근법:

// Neodynamic Reader cannot read barcodes from PDF files directly
// An image extraction step using a separate library was required before reading
// 아니요 direct equivalent exists
// Neodynamic Reader cannot read barcodes from PDF files directly
// An image extraction step using a separate library was required before reading
// 아니요 direct equivalent exists
' Neodynamic Reader cannot read barcodes from PDF files directly
' An image extraction step using a separate library was required before reading
' 아니요 direct equivalent exists
$vbLabelText   $csharpLabel

IronBarcode 접근 방식:

using IronBarCode;

public void ReadBarcodesFromPdf(string pdfPath)
{
    var results = BarcodeReader.Read(pdfPath);

    foreach (var result in results)
    {
        Console.WriteLine($"Value: {result.Value} | Format: {result.Format} | Page: {result.PageNumber}");
    }
}
using IronBarCode;

public void ReadBarcodesFromPdf(string pdfPath)
{
    var results = BarcodeReader.Read(pdfPath);

    foreach (var result in results)
    {
        Console.WriteLine($"Value: {result.Value} | Format: {result.Format} | Page: {result.PageNumber}");
    }
}
Imports IronBarCode

Public Sub ReadBarcodesFromPdf(pdfPath As String)
    Dim results = BarcodeReader.Read(pdfPath)

    For Each result In results
        Console.WriteLine($"Value: {result.Value} | Format: {result.Format} | Page: {result.PageNumber}")
    Next
End Sub
$vbLabelText   $csharpLabel

IronBarcode PDF 문서의 모든 페이지에 있는 바코드를 직접 읽어냅니다. 결과에는 각 바코드가 발견된 페이지 번호가 반환됩니다. 이 기능은 추가 라이브러리나 중간 이미지 추출 단계를 필요로 하지 않습니다.

Neodynamic 바코드 API와IronBarcode매핑 참조

네오다이내믹 API IronBarcode동등품 노트
BarcodeInfo.LicenseOwner = "..." IronBarCode.License.LicenseKey = "key" 단일 키로 병합됨
BarcodeInfo.LicenseKey = "..." (part of single key above) 별도의 소유자 필드가 없습니다.
Neodynamic.SDK.BarcodeReader.BarcodeReader.LicenseOwner (removed) 필요하지 않음
Neodynamic.SDK.BarcodeReader.BarcodeReader.LicenseKey (removed) 필요하지 않음
new BarcodeInfo() BarcodeWriter.CreateBarcode(data, encoding) 정적, 인스턴스 없음
barcode.Value = data 첫 번째 매개변수 CreateBarcode 건설 현장에서 통과됨
barcode.Symbology = Symbology.Code128 BarcodeEncoding.Code128 두 번째 매개변수
barcode.Symbology = Symbology.QRCode BarcodeEncoding.QRCode 이제 왕복 여정 전체가 지원됩니다.
barcode.QRCodeECL = QRCodeErrorCorrectionLevel.H QRCodeWriter.QrErrorCorrectionLevel.Highest 다른 수업 진입점
barcode.GetImage().Save(path, ImageFormat.Png) .SaveAsPng(path) Fluent, ImageFormat 열거형 없음
BarcodeReader.Read(bitmap) BarcodeReader.Read(imagePath) 파일 경로가 비트맵을 대체합니다.
result.Value result.Value 동일한 속성 이름
Symbology.DataMatrix BarcodeEncoding.DataMatrix 세대 전용 → 세대 및 읽기
2D 판독에 대한 throw new NotSupportedException(...) BarcodeReader.Read(imagePath) 작동하는 구현으로 교체하세요.

일반적인 마이그레이션 문제와 해결책

문제 1: 두 개의 포장 제거 주문

문제: 개발자가 Neodynamic 패키지 중 하나만 제거하고 다른 하나는 그대로 두면 컴파일 오류가 발생합니다. 두 SDK는 공통된 형식을 가지고 있지 않지만, 일부 소스 파일은 동일한 파일에서 두 네임스페이스를 모두 가져올 수 있기 때문입니다.

해결 방법: 소스 코드를 변경하기 전에 두 패키지를 모두 제거하십시오. 둘 모두 제거한 후, 모든 using Neodynamic.SDK.Barcodeusing Neodynamic.SDK.BarcodeReader 지시문을 검색하고 함께 제거하세요:

dotnet remove package Neodynamic.SDK.Barcode
dotnet remove package Neodynamic.SDK.BarcodeReader
dotnet remove package Neodynamic.SDK.Barcode
dotnet remove package Neodynamic.SDK.BarcodeReader
SHELL

그런 다음 다음 항목으로 감사를 진행하십시오.

grep -r "Neodynamic.SDK" --include="*.cs" .
grep -r "Neodynamic.SDK" --include="*.cs" .
SHELL

문제 2: 이중 라이선스 구성 정리

문제: 두 Neodynamic 라이선스 블록은 종종 다른 위치에 나타납니다 — 하나는 애플리케이션 시작 클래스에, 다른 하나는 서비스 이니셜라이저에 있습니다. 만약 코드 블록 하나만 제거하면, 남은 코드는 더 이상 존재하지 않는 네임스페이스를 참조하게 되어 컴파일 오류가 발생합니다.

해결 방법:IronBarcode키를 추가하기 전에 Neodynamic 라이선스 속성 할당 4개를 모두 찾아서 한꺼번에 제거하십시오.

grep -r "LicenseOwner\|LicenseKey" --include="*.cs" .
grep -r "LicenseOwner\|LicenseKey" --include="*.cs" .
SHELL

네 줄 모두를 하나의 할당문으로 바꾸세요:

IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY";
IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY";
Imports IronBarCode

IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY"
$vbLabelText   $csharpLabel

문제 3: catch 블록에서 NotSupportedException 제거

문제: Neodynamic Reader를 사용했던 일부 코드베이스는 2D 바코드 판독의 조용한 실패를 처리하기 위해 특별히 catch (NotSupportedException) 블록을 추가했습니다. 해당 캐치 블록은 던지기 코드와 함께 제거되어야 합니다. 그렇지 않으면 catch 절은 더 이상 발생할 수 없는 코드 경로를 참조합니다.

해결책: 바코드 관련 파일에서 NotSupportedException 를 검색하고 각 발생을 검토하세요. 2D 형식 읽기 시도로 인해 예외가 발생한 경우, throw 문과 catch 문을 모두 제거하십시오.

grep -r "NotSupportedException" --include="*.cs" .
grep -r "NotSupportedException" --include="*.cs" .
SHELL

throwing 메서드 본문을 BarcodeReader.Read(imagePath) 로 대체하고, 호출자에서 해당하는 catch 절을 제거하세요.

네오다이내믹 바코드 마이그레이션 체크리스트

사전 마이그레이션

  • 모든 Neodynamic 패키지 참조를 검색하세요: grep -r "Neodynamic.SDK" --include="*.csproj" .
  • 모든 Neodynamic 사용 지시문을 검색하세요: grep -r "using Neodynamic" --include="*.cs" .
  • 라이선스 구성 위치 검색: grep -r &quot;LicenseOwner\|LicenseKey" --include="*.cs" .`
  • 모든 BarcodeInfo 인스턴스화 사이트를 검색하세요: grep -r "new BarcodeInfo\(\)" --include="*.cs" .
  • 모든 Neodynamic 읽기 호출을 검색하세요: grep -r "BarcodeReader.Read" --include="*.cs" .
  • 바코드 경로에서 모든 NotSupportedException 사용을 검색하세요: grep -r "NotSupportedException" --include="*.cs" .
  • 2D 읽기 기능 부족 문제를 해결하기 위해 특별히 추가된 타사 라이브러리(ZXing .NET 또는 유사 라이브러리)가 있는지 확인하십시오. 이러한 라이브러리는 마이그레이션 후 제거할 수 있습니다.
  • 모든 네오다이나믹 라이선스 키를 기록하여 검증 후 비밀 저장소에서 삭제할 수 있도록 하십시오.

코드 업데이트 작업

  1. dotnet remove package Neodynamic.SDK.Barcode 실행
  2. dotnet remove package Neodynamic.SDK.BarcodeReader 실행
  3. dotnet add package IronBarcode 실행
  4. 모든 using Neodynamic.SDK.Barcodeusing Neodynamic.SDK.BarcodeReader 지시문 제거
  5. 바코드 작업을 수행하는 모든 파일에 using IronBarCode 추가
  6. Neodynamic 라이선스 구성 블록 두 개를 모두 제거합니다.
  7. 애플리케이션 시작 시 한 번 IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY" 추가
  8. new BarcodeInfo() + 속성 할당 + barcode.GetImage().Save(...)BarcodeWriter.CreateBarcode(data, encoding).SaveAsPng(path) 으로 대체
  9. 적절하게 QRCodeWriter 패턴을 QRCodeWriter.CreateQrCode() 이용하여 대체
  10. BarcodeReader.Read(bitmap) 호출을 new Bitmap(imagePath) 구성을 제거하고 파일 경로를 BarcodeReader.Read(imagePath) 에 직접 전달하여 대체
  11. 2D 판독을 위한 모든 throw new NotSupportedException(...) 플레이스홀더를 제거하고 BarcodeReader.Read(imagePath) 로 대체
  12. 호출자에서 해당하는 catch (NotSupportedException) 블록 제거
  13. 네오다이내믹 2D 읽기 기능의 부족한 부분을 보완하기 위해 추가된 타사 라이브러리를 모두 제거하십시오.

마이그레이션 후 테스트

  • Code 128 바코드 생성 결과가 이전 설정값 및 DPI와 일치하는지 확인합니다.
  • QR 코드 생성 결과가 스캔 가능한지 확인합니다.
  • 1D 바코드 판독값이 이전 네오다이나믹 리더 구현과 동일한 값을 반환하는지 확인합니다.
  • 이전에 NotSupportedException 를 던졌던 이미지에서 QR 코드 읽기가 성공하는지 확인
  • 애플리케이션 입력에 DataMatrix 및 PDF417 형식이 포함되어 있는 경우 해당 형식 읽기가 성공적으로 완료되는지 확인합니다.
  • 애플리케이션이 PDF 문서를 처리하는지 PDF 바코드 읽기 기능을 테스트합니다.
  • 구성 파일 및 환경 변수에서 모든 Neodynamic 라이선스 키 참조가 제거되었는지 확인하십시오.
  • 타사 2D 라이브러리(있는 경우)가 완전히 제거되었는지, 그리고 남아 있는 가져오기 항목 중 해당 라이브러리를 참조하는 항목이 없는지 확인하십시오.

IronBarcode로 마이그레이션할 때의 주요 이점

통합 읽기/쓰기 기능: 마이그레이션 후IronBarcode에서 생성할 수 있는 모든 심볼은 동일한 라이브러리를 통해 다시 읽어올 수도 있습니다. 네오다이나믹의 생성기와 판독기 사이의 비대칭성, 즉 QR 코드, DataMatrix, PDF417 및 Aztec을 생성할 수는 있지만 사용할 수는 없었던 문제가 해결되었습니다. 이전에는 2D 읽기를 위해 별도의 해결 방법이나 타사 라이브러리가 필요했던 애플리케이션들이 추가적인 통합 작업 없이 해당 기능을 사용할 수 있게 되었습니다.

단일 라이선스 관리: 하나의 NuGet 패키지, 하나의 라이선스 키, 하나의 구성 블록으로 두 개의 개별 제품 구독을 대체합니다. 갱신, 핵심 인력 순환 및 환경 변수 관리가 절반으로 간소화됩니다. 관리비 절감은 일회성 성과가 아니라 지속적인 성과입니다.

PDF 바코드 읽기 기능:IronBarcode PDF 문서에서 바코드를 직접 읽어 바코드 값과 함께 페이지 번호 메타데이터를 반환합니다. 배송 명세서, 송장 또는 내장된 바코드가 포함된 의료 기록을 처리하는 애플리케이션은 더 이상 바코드 읽기를 지원하기 위해 중간 이미지 추출 단계나 추가 PDF 라이브러리가 필요하지 않습니다. 지원되는 바코드 형식 의 전체 목록을 참조하여 모든 심볼 및 입력 유형을 확인하십시오.

System.Drawing 종속성 제거: Neodynamic의 SDK는 System.Drawing에 의존하여, Linux 및 Docker 컨테이너에서 추가적인 네이티브 라이브러리 구성이 필요합니다. IronBarcode에는 System.Drawing 종속성이 없으므로, 동일한 코드베이스가 Windows, Linux 및 컨테이너화된 클라우드 환경에서 플랫폼별 구성 변경 없이 실행됩니다.

간소화된 라이선스 비용으로 완벽한 기능 활용: Neodynamic SDK 두 Plus 2D 판독을 위한 세 번째 라이브러리가 모두 필요했던 프로젝트는IronBarcode단일 라이선스로 제공하는 기능을 구현하기 위해 세 가지 종속성에 대한 비용을 지불하고 있었습니다. 생성 Plus 2D 판독이 모두 필요한 프로젝트의 경우, 마이그레이션을 통해 기술적 요구 사항과 라이선스 비용을 단일 상용 제품으로 통합할 수 있습니다. 최신 가격 정보는IronBarcode 라이선스 페이지 에서 확인할 수 있습니다.

참고해 주세요Neodynamic 및 ZXing.NET은 각각의 소유자의 등록 상표입니다. 이 사이트는 Neodynamic 또는 ZXing.NET과 관련이 없으며, 후원하거나 지원받지 않습니다. 모든 제품명, 로고 및 브랜드는 해당 소유자의 자산입니다. 비교는 정보 제공 목적으로만 사용되며, 작성 시점에 공개적으로 이용 가능한 정보를 반영합니다.

자주 묻는 질문

네오다이나믹 바코드 프로페셔널에서 IronBarcode로 마이그레이션해야 하는 이유는 무엇인가요?

일반적인 이유로는 라이선스 간소화(SDK + 런타임 키 복잡성 제거), 처리량 제한 제거, 네이티브 PDF 지원 확보, Docker/CI/CD 배포 개선, 프로덕션 코드의 API 상용구 감소 등이 있습니다.

Neodynamic API 호출을 IronBarcode로 대체하려면 어떻게 해야 하나요?

인스턴스 생성 및 라이선스 상용구를 IronBarCode.License.LicenseKey = "key"로 대체합니다. 판독기 호출을 BarcodeReader.Read(경로)로, 쓰기 호출을 BarcodeWriter.CreateBarcode(데이터, 인코딩)로 바꿉니다. 정적 메서드는 인스턴스 관리가 필요하지 않습니다.

네오다이나믹 바코드 프로페셔널에서 IronBarcode로 마이그레이션할 때 얼마나 많은 코드가 변경되나요?

대부분의 마이그레이션은 더 적은 코드 줄로 이루어집니다. 라이선스 상용구, 인스턴스 생성자, 명시적 형식 구성이 제거됩니다. 핵심 읽기/쓰기 작업이 더 간결한 결과 객체를 가진 더 짧은 IronBarcode에 매핑됩니다.

마이그레이션하는 동안 Neodynamic Barcode Professional과 IronBarcode를 모두 설치해야 하나요?

아니요. 대부분의 마이그레이션은 병렬 작업이 아닌 직접 교체 작업입니다. 한 번에 하나의 서비스 클래스를 마이그레이션하고, NuGet 참조를 교체하고, 인스턴스화 및 API 호출 패턴을 업데이트한 후 다음 클래스로 이동합니다.

IronBarcode의 NuGet 패키지 이름은 무엇인가요?

패키지는 'IronBarCode'(대문자 B와 C 포함)입니다. '설치-패키지 IronBarCode' 또는 '닷넷 추가 패키지 IronBarCode'로 설치합니다. 코드의 사용 지시어는 'using IronBarCode;'입니다.

IronBarcode는 네오다이나믹 바코드 프로페셔널과 비교했을 때 어떻게 Docker 배포를 간소화하나요?

IronBarcode는 외부 SDK 파일이나 마운트된 라이선스 구성이 없는 NuGet 패키지입니다. Docker에서 IRONBARCODE_LICENSE_KEY 환경 변수를 설정하면 패키지가 시작 시 라이선스 유효성 검사를 처리합니다.

Neodynamic에서 마이그레이션한 후 IronBarcode가 모든 바코드 형식을 자동으로 감지하나요?

예. IronBarcode는 지원되는 모든 형식에서 기호를 자동으로 감지합니다. 명시적인 바코드 유형 열거가 필요하지 않습니다. 형식이 이미 알려져 있고 성능이 중요한 경우 BarcodeReaderOptions를 사용하여 검색 공간을 최적화하여 제한할 수 있습니다.

IronBarcode는 별도의 라이브러리 없이 PDF에서 바코드를 판독할 수 있나요?

예. BarcodeReader.Read("document.pdf")는 기본적으로 PDF 파일을 처리합니다. 결과에는 발견된 각 바코드에 대한 페이지 번호, 형식, 값 및 신뢰도가 포함됩니다. 외부 PDF 렌더링 단계가 필요하지 않습니다.

IronBarcode는 병렬 바코드 처리를 어떻게 처리하나요?

IronBarcode의 정적 메서드는 상태 저장소가 없고 스레드에 안전합니다. 스레드별 인스턴스 관리 없이 파일 목록에 직접 Parallel.ForEach를 사용할 수 있습니다. BarcodeReaderOptions.MaxParallelThreads는 내부 스레드 예산을 제어합니다.

네오다이나믹 바코드 프로페셔널에서 IronBarcode로 마이그레이션하면 어떤 결과 속성이 변경되나요?

일반적인 이름 변경: 바코드 값은 값으로, 바코드 유형은 형식으로 바뀝니다. IronBarcode 결과에는 신뢰도 및 페이지 번호도 추가됩니다. 솔루션 전반의 검색 및 바꾸기 기능은 기존 결과 처리 코드에서 이름 변경을 처리합니다.

CI/CD 파이프라인에서 IronBarcode 라이선싱을 설정하려면 어떻게 해야 하나요?

IRONBARCODE_LICENSE_KEY를 파이프라인 시크릿으로 저장하고 애플리케이션 시작 코드에 IronBarCode.License.LicenseKey를 할당하세요. 하나의 비밀은 개발, 테스트, 스테이징 및 프로덕션을 포함한 모든 환경에 적용됩니다.

IronBarcode는 사용자 지정 스타일로 QR 코드 생성을 지원하나요?

예. QRCodeWriter.CreateQrCode()는 변경바코드색()을 통한 사용자 지정 색상, 추가브랜드 로고()를 통한 로고 임베딩, 구성 가능한 오류 수정 수준, PNG, JPG, PDF, 스트림을 포함한 여러 출력 형식을 지원합니다.

Curtis Chau
기술 문서 작성자

커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.

커티스는 개발 분야 외에도 사물 인터넷(IoT)에 깊은 관심을 가지고 있으며, 하드웨어와 소프트웨어를 통합하는 혁신적인 방법을 연구합니다. 여가 시간에는 게임을 즐기거나 디스코드 봇을 만들면서 기술에 대한 애정과 창의성을 결합합니다.

아이언 서포트 팀

저희는 주 5일, 24시간 온라인으로 운영합니다.
채팅
이메일
전화해