Dynamsoft Barkod Okuyucu'dan IronBarcode'a Geçiş
Dynamsoft Barkod Okuyucu'dan IronBarcode'a göç eden çoğu geliştirici iki gruptan birine düşer: İyi duyulmuş bir itici olan Dynamsoft'u seçenler ve daha sonra kamera merkezli API'nin bir belge işleme kullanım senaryosuna uygun olmadığını keşfedenler ve lisans sunucusu bağımlılığının üretim olaylarına neden olduğu hava boşluklu veya Docker ortamlarında çalışanlar.
İlk gruptaysanız, geçiş, harici PDF görüntüleme kütüphanesini, sayfa başına render döngüsünü ve hata kodu lisans modelini kaldırır. Eğer ikinci grupta yer alıyorsanız, geçiş işlemi InitLicense ağ çağrısını, çevrimdışı lisans-içerik paketini ve yenileme döngüsünü ve dışa giden ağ politikasını Docker veya VPC yapılandırmanızdan kaldırır. Her iki durumda da, kod tabanı bu geçişten sonra daha kısa olur.
Bu kılavuz, kaybettiklerinizle ilgili dürüsttür: eğer uygulamanız gerçek zamanlı kamera karelerini işliyorsa, Dynamsoft'un Capture Vision iş hattı bu iş yükü için ayarlanmıştır ve IronBarcode doğru bir yedek değildir. Bu geçiş kılavuzu, sunucu tarafı dosya işleme, belge iş akışları ve lisans sunucusu erişiminin bir sorun olduğu ortamlara yöneliktir.
Adım 1: NuGet Paketlerini Değiştirin
dotnet remove package Dynamsoft.DotNet.BarcodeReader.Bundle
dotnet add package BarCode
Projenize yalnızca Dynamsoft için eklenmiş bir PDF görüntüleme kütüphanesi varsa (PdfiumViewer en yaygın olanıdır), o da kaldırılabilir:
# Remove if added only for Dynamsoft PDF support
dotnet remove package PdfiumViewer
dotnet remove package PdfiumViewer.Native.x86_64.v8-xfa
Adım 2: Lisans Başlatmayı Değiştirin
İlk basitleşmenin gerçekleştiği yer burasıdır. Dynamsoft modeli, her başlangıçta bir hata kodu kontrolü ve istisna yönetimi gerektirir:
Önce — Dynamsoft:
using Dynamsoft.License;
using Dynamsoft.Core;
// Must run before any barcode operations
int errorCode = LicenseManager.InitLicense("YOUR-DYNAMSOFT-KEY", out string errorMsg);
if (errorCode != (int)EnumErrorCode.EC_OK)
throw new InvalidOperationException($"License validation failed [{errorCode}]: {errorMsg}");Imports Dynamsoft.License
Imports Dynamsoft.Core
' Must run before any barcode operations
Dim errorCode As Integer = LicenseManager.InitLicense("YOUR-DYNAMSOFT-KEY", errorMsg)
If errorCode <> CType(EnumErrorCode.EC_OK, Integer) Then
Throw New InvalidOperationException($"License validation failed [{errorCode}]: {errorMsg}")
End IfSonrası — IronBarcode:
// NuGet: dotnet add package BarCode
using IronBarCode;
// Local validation — no network call, no error code
IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY";Imports IronBarCode
' Local validation — no network call, no error code
IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY"Bir ASP.NET Core uygulamasında, bunu Program.cs öncesinde builder.Build() içerisine ekleyin:
IronBarCode.License.LicenseKey = Environment.GetEnvironmentVariable("IRONBARCODE_KEY")
?? "YOUR-LICENSE-KEY";Imports IronBarCode
IronBarCode.License.LicenseKey = If(Environment.GetEnvironmentVariable("IRONBARCODE_KEY"), "YOUR-LICENSE-KEY")Bir Docker veya Kubernetes ortamında, dağıtım manifestosunda IRONBARCODE_KEY ortam değişkenini ayarlayın. Dışa giden ağ kuralları gerekli değildir.
Adım 3: Ad Alanı İthalatlarını Değiştirin
Tüm kaynak dosyaları genelinde bul ve değiştir:
grep -r "using Dynamsoft\." --include="*.cs" .
Her oluşumu değiştirin:
// Before
using Dynamsoft.CVR;
using Dynamsoft.DBR;
using Dynamsoft.License;
using Dynamsoft.Core;
// After
using IronBarCode;Imports IronBarCodeKod Göç Örnekleri
Temel Dosya Okuma
En temel işlem — bir resim dosyasından barkod okuma.
Önce — Dynamsoft:
using Dynamsoft.CVR;
using Dynamsoft.DBR;
public string ReadBarcodeFromFile(CaptureVisionRouter router, string imagePath)
{
CapturedResult result = router.Capture(imagePath, PresetTemplate.PT_READ_BARCODES);
BarcodeResultItem[] items = result.GetDecodedBarcodesResult()?.GetItems();
if (items == null || items.Length == 0)
return null;
return items[0].GetText();
}Imports Dynamsoft.CVR
Imports Dynamsoft.DBR
Public Function ReadBarcodeFromFile(router As CaptureVisionRouter, imagePath As String) As String
Dim result As CapturedResult = router.Capture(imagePath, PresetTemplate.PT_READ_BARCODES)
Dim items As BarcodeResultItem() = result.GetDecodedBarcodesResult()?.GetItems()
If items Is Nothing OrElse items.Length = 0 Then
Return Nothing
End If
Return items(0).GetText()
End FunctionSonrası — IronBarcode:
// NuGet: dotnet add package BarCode
using IronBarCode;
public string ReadBarcodeFromFile(string imagePath)
{
var results = BarcodeReader.Read(imagePath);
return results?.FirstOrDefault()?.Value;
}Imports IronBarCode
Public Function ReadBarcodeFromFile(imagePath As String) As String
Dim results = BarcodeReader.Read(imagePath)
Return results?.FirstOrDefault()?.Value
End FunctionYönlendirici örneği yok oldu. BarcodeReader.Read statiktir. BarcodeResultItem.GetText(), .Value olur. LINQ ile results üzerindeki null kontrolü daha temizdir.
Birden Fazla Barkod Okuma
Önce — Dynamsoft:
using Dynamsoft.CVR;
using Dynamsoft.DBR;
public List<string> ReadAllBarcodes(CaptureVisionRouter router, string imagePath)
{
SimplifiedCaptureVisionSettings settings = router.GetSimplifiedSettings(
PresetTemplate.PT_READ_BARCODES);
settings.BarcodeSettings.ExpectedBarcodesCount = 0; // 0 = find all
router.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings);
CapturedResult result = router.Capture(imagePath, PresetTemplate.PT_READ_BARCODES);
BarcodeResultItem[] items = result.GetDecodedBarcodesResult()?.GetItems();
var values = new List<string>();
if (items != null)
{
foreach (var item in items)
values.Add(item.GetText());
}
return values;
}Imports Dynamsoft.CVR
Imports Dynamsoft.DBR
Public Function ReadAllBarcodes(router As CaptureVisionRouter, imagePath As String) As List(Of String)
Dim settings As SimplifiedCaptureVisionSettings = router.GetSimplifiedSettings(PresetTemplate.PT_READ_BARCODES)
settings.BarcodeSettings.ExpectedBarcodesCount = 0 ' 0 = find all
router.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings)
Dim result As CapturedResult = router.Capture(imagePath, PresetTemplate.PT_READ_BARCODES)
Dim items As BarcodeResultItem() = result.GetDecodedBarcodesResult()?.GetItems()
Dim values As New List(Of String)()
If items IsNot Nothing Then
For Each item In items
values.Add(item.GetText())
Next
End If
Return values
End FunctionSonrası — IronBarcode:
using IronBarCode;
public List<string> ReadAllBarcodes(string imagePath)
{
var options = new BarcodeReaderOptions
{
ExpectMultipleBarcodes = true,
MaxParallelThreads = 4
};
return BarcodeReader.Read(imagePath, options)
.Select(r => r.Value)
.ToList();
}Imports IronBarCode
Public Function ReadAllBarcodes(imagePath As String) As List(Of String)
Dim options As New BarcodeReaderOptions With {
.ExpectMultipleBarcodes = True,
.MaxParallelThreads = 4
}
Return BarcodeReader.Read(imagePath, options) _
.Select(Function(r) r.Value) _
.ToList()
End FunctionBaytlardan Okuma (Bellek İçi Görüntüler)
Önce — Dynamsoft:
using Dynamsoft.CVR;
using Dynamsoft.Core;
using Dynamsoft.DBR;
// Requires width, height, stride, and pixel format — low-level buffer API
public string ReadFromBuffer(CaptureVisionRouter router, byte[] rawPixels, int width, int height)
{
var imageData = new ImageData
{
Bytes = rawPixels,
Width = width,
Height = height,
Stride = width * 3, // assuming 24bpp RGB
Format = EnumImagePixelFormat.IPF_RGB_888
};
CapturedResult result = router.Capture(imageData, PresetTemplate.PT_READ_BARCODES);
return result.GetDecodedBarcodesResult()?.GetItems()?.FirstOrDefault()?.GetText();
}Imports Dynamsoft.CVR
Imports Dynamsoft.Core
Imports Dynamsoft.DBR
' Requires width, height, stride, and pixel format — low-level buffer API
Public Function ReadFromBuffer(router As CaptureVisionRouter, rawPixels As Byte(), width As Integer, height As Integer) As String
Dim imageData As New ImageData With {
.Bytes = rawPixels,
.Width = width,
.Height = height,
.Stride = width * 3, ' assuming 24bpp RGB
.Format = EnumImagePixelFormat.IPF_RGB_888
}
Dim result As CapturedResult = router.Capture(imageData, PresetTemplate.PT_READ_BARCODES)
Return result.GetDecodedBarcodesResult()?.GetItems()?.FirstOrDefault()?.GetText()
End FunctionSonrası — IronBarcode:
using IronBarCode;
// Pass PNG/JPEG/BMP bytes directly — no pixel format or stride calculation
public string ReadFromImageBytes(byte[] imageBytes)
{
return BarcodeReader.Read(imageBytes)?.FirstOrDefault()?.Value;
}Imports IronBarCode
Public Function ReadFromImageBytes(imageBytes As Byte()) As String
Return BarcodeReader.Read(imageBytes)?.FirstOrDefault()?.Value
End FunctionUygulamanız daha önce Dynamsoft için resim baytlarını ham piksel tamponuna dönüştürdüyse, kod çözüp ham piksellere dönüştürmeden önce özgün kodlanmış resim baytlarını (PNG, JPEG, BMP) doğrudan IronBarcode'a geçebilirsiniz.
PDF Barkod Okuma — Döngü Renderini Kaldırın
Bu genellikle geçişte en büyük kod azaltımıdır. Tüm PdfiumViewer render döngüsünü kaldırın ve tek bir çağrı ile değiştirin.
Önce — Dynamsoft ve PdfiumViewer ile:
// Requires: Dynamsoft.DotNet.BarcodeReader.Bundle + PdfiumViewer + PdfiumViewer.Native.*
using Dynamsoft.CVR;
using Dynamsoft.DBR;
using PdfiumViewer;
using System.Drawing.Imaging;
public List<string> ReadBarcodesFromPdf(CaptureVisionRouter router, string pdfPath)
{
var allBarcodes = new List<string>();
using (var pdfDoc = PdfDocument.Load(pdfPath))
{
for (int page = 0; page < pdfDoc.PageCount; page++)
{
using var image = pdfDoc.Render(page, 300, 300, true);
using var ms = new MemoryStream();
image.Save(ms, ImageFormat.Png);
CapturedResult result = router.Capture(ms.ToArray(),
PresetTemplate.PT_READ_BARCODES);
var items = result.GetDecodedBarcodesResult()?.GetItems();
if (items != null)
{
foreach (var item in items)
allBarcodes.Add(item.GetText());
}
}
}
return allBarcodes;
}Imports Dynamsoft.CVR
Imports Dynamsoft.DBR
Imports PdfiumViewer
Imports System.Drawing.Imaging
Public Function ReadBarcodesFromPdf(router As CaptureVisionRouter, pdfPath As String) As List(Of String)
Dim allBarcodes As New List(Of String)()
Using pdfDoc As PdfDocument = PdfDocument.Load(pdfPath)
For page As Integer = 0 To pdfDoc.PageCount - 1
Using image = pdfDoc.Render(page, 300, 300, True)
Using ms As New MemoryStream()
image.Save(ms, ImageFormat.Png)
Dim result As CapturedResult = router.Capture(ms.ToArray(), PresetTemplate.PT_READ_BARCODES)
Dim items = result.GetDecodedBarcodesResult()?.GetItems()
If items IsNot Nothing Then
For Each item In items
allBarcodes.Add(item.GetText())
Next
End If
End Using
End Using
Next
End Using
Return allBarcodes
End FunctionSonrası — IronBarcode:
using IronBarCode;
public List<string> ReadBarcodesFromPdf(string pdfPath)
{
return BarcodeReader.Read(pdfPath)
.Select(r => r.Value)
.ToList();
}Imports IronBarCode
Public Function ReadBarcodesFromPdf(pdfPath As String) As List(Of String)
Return BarcodeReader.Read(pdfPath) _
.Select(Function(r) r.Value) _
.ToList()
End FunctionSayfa döngüsü, PdfDocument, 300 DPI render aşaması, MemoryStream ve her sayfa için Capture çağrısı hepsi kaybolur. IronBarcode PDF sayfalarını dahili olarak işler.
Seçenekli PDF'den okumak mı gerekiyor (yoğun veya zor barkodlar için):
using IronBarCode;
public List<string> ReadBarcodesFromPdfAccurate(string pdfPath)
{
var options = new BarcodeReaderOptions
{
Speed = ReadingSpeed.Balanced,
ExpectMultipleBarcodes = true
};
return BarcodeReader.Read(pdfPath, options)
.Select(r => r.Value)
.ToList();
}Imports IronBarCode
Public Function ReadBarcodesFromPdfAccurate(pdfPath As String) As List(Of String)
Dim options As New BarcodeReaderOptions With {
.Speed = ReadingSpeed.Balanced,
.ExpectMultipleBarcodes = True
}
Return BarcodeReader.Read(pdfPath, options) _
.Select(Function(r) r.Value) _
.ToList()
End FunctionÇevrimdışı / Hava Aralıklı Dağıtım
Mevcut kodunuzda çevrimdışı lisanslama deseni varsa, tamamen kaldırın:
Önce — Dynamsoft çevrimdışı lisansı:
using Dynamsoft.License;
using Dynamsoft.Core;
// Dynamsoft offline: fetch license bundle on a connected machine, persist it,
// then replay it on the offline machine via InitLicenseFromLicenseContent.
int errorCode = LicenseManager.InitLicenseFromLicenseContent(
licenseContent,
out string errorMsg);
if (errorCode != (int)EnumErrorCode.EC_OK)
throw new InvalidOperationException($"Offline license failed: {errorMsg}");Imports Dynamsoft.License
Imports Dynamsoft.Core
' Dynamsoft offline: fetch license bundle on a connected machine, persist it,
' then replay it on the offline machine via InitLicenseFromLicenseContent.
Dim errorMsg As String
Dim errorCode As Integer = LicenseManager.InitLicenseFromLicenseContent(licenseContent, errorMsg)
If errorCode <> CType(EnumErrorCode.EC_OK, Integer) Then
Throw New InvalidOperationException($"Offline license failed: {errorMsg}")
End IfSonrası — IronBarcode:
// Remove all of the above. Replace with:
IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY";IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY"Alınacak ve yenilenecek lisans-içerik paketi yok. Bağlı makine önyükleme adımı yok. Anahtar yerel olarak doğrulanır.
Docker Yapılandırması
Eğer daha önce Dynamsoft'un lisans uç noktalarına dışa yönelik HTTPS'e izin vermek için ağ çıkış kuralları veya proxy konfigürasyonu yaptıysanız:
# Before: Docker or Kubernetes egress policy
# Required: Allow outbound HTTPS to Dynamsoft licence endpoints
# After: Remove that egress rule.
# IronBarcode does not require outbound network access for license validation.
# Set license via environment variable
env:
- name: IRONBARCODE_KEY
valueFrom:
secretKeyRef:
name: ironbarcode-license
key: key
Örnek Yönetimi Temizleme
Dynamsoft, CaptureVisionRouter tabanlı bir örnek API kullanır. Kodunuzda hizmet sınıflarında, alan başlatıcılarında veya DI kayıtlarında yönlendirici örnekleri oluşturuyorsa, tümü kaybolur:
Önce — Dynamsoft örnek yönetimi:
using Dynamsoft.CVR;
using Dynamsoft.DBR;
using Dynamsoft.License;
using Dynamsoft.Core;
public class BarcodeService : IDisposable
{
private readonly CaptureVisionRouter _router;
public BarcodeService()
{
int errorCode = LicenseManager.InitLicense("KEY", out string errorMsg);
if (errorCode != (int)EnumErrorCode.EC_OK)
throw new InvalidOperationException(errorMsg);
_router = new CaptureVisionRouter();
var settings = _router.GetSimplifiedSettings(PresetTemplate.PT_READ_BARCODES);
settings.BarcodeSettings.ExpectedBarcodesCount = 0;
_router.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings);
}
public string[] ReadFile(string path)
{
CapturedResult result = _router.Capture(path, PresetTemplate.PT_READ_BARCODES);
var items = result.GetDecodedBarcodesResult()?.GetItems();
return items?.Select(i => i.GetText()).ToArray() ?? Array.Empty<string>();
}
public void Dispose()
{
_router?.Dispose();
}
}Imports Dynamsoft.CVR
Imports Dynamsoft.DBR
Imports Dynamsoft.License
Imports Dynamsoft.Core
Public Class BarcodeService
Implements IDisposable
Private ReadOnly _router As CaptureVisionRouter
Public Sub New()
Dim errorCode As Integer = LicenseManager.InitLicense("KEY", errorMsg:=Nothing)
If errorCode <> CType(EnumErrorCode.EC_OK, Integer) Then
Throw New InvalidOperationException(errorMsg)
End If
_router = New CaptureVisionRouter()
Dim settings = _router.GetSimplifiedSettings(PresetTemplate.PT_READ_BARCODES)
settings.BarcodeSettings.ExpectedBarcodesCount = 0
_router.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings)
End Sub
Public Function ReadFile(path As String) As String()
Dim result As CapturedResult = _router.Capture(path, PresetTemplate.PT_READ_BARCODES)
Dim items = result.GetDecodedBarcodesResult()?.GetItems()
Return If(items?.Select(Function(i) i.GetText()).ToArray(), Array.Empty(Of String)())
End Function
Public Sub Dispose() Implements IDisposable.Dispose
_router?.Dispose()
End Sub
End ClassSonra — IronBarcode statik API:
// NuGet: dotnet add package BarCode
using IronBarCode;
public class BarcodeService
{
// No constructor initialization — license set once at app startup
// No Dispose — no instance to clean up
public string[] ReadFile(string path)
{
var options = new BarcodeReaderOptions { ExpectMultipleBarcodes = true };
return BarcodeReader.Read(path, options)
.Select(r => r.Value)
.ToArray();
}
}Imports IronBarCode
Public Class BarcodeService
' No constructor initialization — license set once at app startup
' No Dispose — no instance to clean up
Public Function ReadFile(path As String) As String()
Dim options As New BarcodeReaderOptions With {.ExpectMultipleBarcodes = True}
Return BarcodeReader.Read(path, options) _
.Select(Function(r) r.Value) _
.ToArray()
End Function
End ClassSınıf, yapıcısını, IDisposable uygulamasını ve _router alanını kaybeder. Bu hizmet, DI içinde bir singleton veya yaşam döngüsü hizmeti olarak kaydedilmişse, bu kayıt basitleştirilebilir veya hizmet bir dizi statik metoda dönüşebilir.
Okuma Hızı vs Zaman Aşımı Eşleme
Dynamsoft, kamera kare hızları için optimize edilmiş milisaniyeler cinsinden bir Timeout kullanır. IronBarcode bir ReadingSpeed enum kullanır:
| Dynamsoft ayarı | IronBarcode eşdeğeri |
|---|---|
settings.Timeout = 100 (kamera hattı) | Speed = ReadingSpeed.Faster |
| Düşük zaman aşımı (hız öncelikli) | Speed = ReadingSpeed.Balanced |
| Daha yüksek zaman aşımı (doğruluk öncelikli) | Speed = ReadingSpeed.Detailed |
| Maksimum doğruluk, zaman baskısı yok | Speed = ReadingSpeed.ExtremeDetail |
İş hacminin 100ms altındaki yanıt süresinden daha önemli olduğu çoğu belge işleme iş akışları için, ReadingSpeed.Balanced doğru varsayılandır:
var options = new BarcodeReaderOptions
{
Speed = ReadingSpeed.Balanced,
ExpectMultipleBarcodes = true,
MaxParallelThreads = 4
};Dim options As New BarcodeReaderOptions With {
.Speed = ReadingSpeed.Balanced,
.ExpectMultipleBarcodes = True,
.MaxParallelThreads = 4
}Yaygın Geçiş Sorunları
BarcodeResultItem.GetText() vs result.Value
Erişim yöntemi bir özellikten değiştirilmiştir:
// Before
string value = item.GetText();
// After
string value = result.Value;' Before
Dim value As String = item.GetText()
' After
Dim value As String = result.ValueBarcodeResultItem.GetFormatString() vs result.Format
Dynamsoft formatı GetFormatString() üzerinden bir string olarak döndürür. IronBarcode bunu BarcodeEncoding enum olarak result.Format üzerindeki bir enum olarak sunar:
// Before
if (item.GetFormatString() == "QR_CODE")
Console.WriteLine("Found QR code");
// After
if (result.Format == BarcodeEncoding.QRCode)
Console.WriteLine("Found QR code");
// For logging without enum comparison — .ToString() works on both
Console.WriteLine($"Format: {result.Format}");' Before
If item.GetFormatString() = "QR_CODE" Then
Console.WriteLine("Found QR code")
End If
' After
If result.Format = BarcodeEncoding.QRCode Then
Console.WriteLine("Found QR code")
End If
' For logging without enum comparison — .ToString() works on both
Console.WriteLine($"Format: {result.Format}")Null Sonuçlar vs Boş Koleksiyon
Dynamsoft'un GetDecodedBarcodesResult()'i, barkod bulunamadığında null döndürebilir. IronBarcode boş bir koleksiyon döndürür. Null kontrollerini güncelleyin:
// Before: null check required
CapturedResult result = router.Capture(path, PresetTemplate.PT_READ_BARCODES);
var items = result.GetDecodedBarcodesResult()?.GetItems();
if (items != null && items.Length > 0)
Process(items[0].GetText());
// After: null-safe but also correct to check Count
var results = BarcodeReader.Read(path);
if (results.Any())
Process(results.First().Value);Imports System.Linq
' Before: null check required
Dim result As CapturedResult = router.Capture(path, PresetTemplate.PT_READ_BARCODES)
Dim items = result.GetDecodedBarcodesResult()?.GetItems()
If items IsNot Nothing AndAlso items.Length > 0 Then
Process(items(0).GetText())
End If
' After: null-safe but also correct to check Count
Dim results = BarcodeReader.Read(path)
If results.Any() Then
Process(results.First().Value)
End IfSimplifiedCaptureVisionSettings to BarcodeReaderOptions
GetSimplifiedSettings / UpdateSettings deseni Read'e geçerken BarcodeReaderOptions olur:
// Before
var settings = router.GetSimplifiedSettings(PresetTemplate.PT_READ_BARCODES);
settings.BarcodeSettings.ExpectedBarcodesCount = 0;
settings.Timeout = 500;
router.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings);
var result = router.Capture(path, PresetTemplate.PT_READ_BARCODES);
// After
var options = new BarcodeReaderOptions
{
Speed = ReadingSpeed.Balanced,
ExpectMultipleBarcodes = true
};
var results = BarcodeReader.Read(path, options);' Before
Dim settings = router.GetSimplifiedSettings(PresetTemplate.PT_READ_BARCODES)
settings.BarcodeSettings.ExpectedBarcodesCount = 0
settings.Timeout = 500
router.UpdateSettings(PresetTemplate.PT_READ_BARCODES, settings)
Dim result = router.Capture(path, PresetTemplate.PT_READ_BARCODES)
' After
Dim options As New BarcodeReaderOptions With {
.Speed = ReadingSpeed.Balanced,
.ExpectMultipleBarcodes = True
}
Dim results = BarcodeReader.Read(path, options)Geçiş Kontrol Listesi
Güncellenmesi gereken tüm Dynamsoft referanslarını bulmak için bu aramaları gerçekleştirin:
grep -r "using Dynamsoft\." --include="*.cs" .
grep -r "LicenseManager.InitLicense\|EnumErrorCode\|EC_OK" --include="*.cs" .
grep -r "new CaptureVisionRouter\|router\.Capture\|PresetTemplate" --include="*.cs" .
grep -r "BarcodeResultItem\|GetDecodedBarcodesResult\|GetFormatString" --include="*.cs" .
grep -r "GetSimplifiedSettings\|UpdateSettings\|SimplifiedCaptureVisionSettings" --include="*.cs" .
grep -r "router\.Dispose\|InitLicenseFromLicenseContent" --include="*.cs" .
Her bir eşleşme üzerinde çalışın:
using Dynamsoft.*→using IronBarCodeLicenseManager.InitLicense(key, out errorMsg)+ hata kontrolü →IronBarCode.License.LicenseKey = "key"new CaptureVisionRouter()→ kaldır (statik API, örnek yok)router.Capture(path, PresetTemplate.PT_READ_BARCODES)→BarcodeReader.Read(path)router.Capture(imageData, ...)(ham piksel tamponu) →BarcodeReader.Read(imageBytes)- Sayfa başına PDF işleme döngüsü +
router.Capture(pageBytes, ...)→BarcodeReader.Read(pdfPath) BarcodeResultItem.GetText()→result.ValueBarcodeResultItem.GetFormatString()→result.FormatGetSimplifiedSettings(...)+UpdateSettings(...)→new BarcodeReaderOptions { ... }router.Dispose()→ kaldırLicenseManager.InitLicenseFromLicenseContent(...)→ tamamen kaldır- PdfiumViewer NuGet paketlerini yalnızca Dynamsoft PDF işleme desteği için eklediyseniz kaldırın
- Docker/Kubernetes ağ çıkıs kurallarını Dynamsoft lisans uç noktaları için kaldır
- Dağıtım yapılandırmasında
IRONBARCODE_KEYortam değişkenini ayarla

Curtis Chau, Bilgisayar Bilimleri alanında Lisans Derecesine (Carleton Üniversitesi) sahip ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirmeyle ilgileniyor. Sezgisel ve estetik açıdan hoş kullanıcı arayüzleri oluşturma tutkunu, Curtis modern çerçevelerle çalışmayı ve iyi yapılandırılmış, görsel olarak çekici kılavuzlar oluşturmayı seviyor.