Table of contents
Swift
Objective-C

Migrate from 9.x to 11.x

Dynamsoft Barcode Reader SDK has been refactored to integrate with the DynamsoftCaptureVision (DCV) architecture since version 10.0. This guide helps you upgrade from version 9.x by highlighting the key API changes and providing migration paths.

The actual migration effort depends on which APIs you currently use. In many cases, only the interfaces you actively use need to be updated — review the sections below to identify the changes that affect your integration.

If you are new to the DCV architecture and prefer to start fresh, refer to the User Guide for a quick-start tutorial.

Update the License Key

You may need to update your license key before upgrading to version 11.x.

  • 30-Day Free Trial License: Visit the Request a Trial License page to obtain a free license for evaluation.
  • Annual Online Full License: Your license will continue to work with the new SDK version. Go to Customer Portal to get your license key.
  • Perpetual License: Please contact our sales team to update your license.

Update the Maven Dependency

Update your pom.xml file with the latest version:

<repositories>
    <repository>
        <id>dbr</id>
        <url>https://download2.dynamsoft.com/maven/dbr/jar</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.dynamsoft</groupId>
        <artifactId>dbr</artifactId>
        <version>11.4.1000</version>
    </dependency>
</dependencies>

Migrate License Activation Code

Starting from 10.0, we have unified the API for setting licenses across different Dynamsoft products.

Old APIs New APIs
BarcodeReader.initLicense LicenseManager.initLicense

Migrate Decoding APIs

Single Image Decoding

The APIs for decoding single image have been adjusted as follows:

Old APIs New APIs
BarcodeReader.decodeFile CaptureVisionRouter.capture
BarcodeReader.decodeFileInMemory CaptureVisionRouter.capture
BarcodeReader.decodeBuffer CaptureVisionRouter.capture
BarcodeReader.decodeBufferedImage CaptureVisionRouter.capture
class TextResult class BarcodeResultItem
BarcodeReader.decodeBase64String ImageIO.readFromBase64String + CaptureVisionRouter.Capture

Video Streaming Decoding

ImageSourceAdapter is added to replace the FrameDecodingParameters and the previous video methods. You should implement ImageSourceAdapter to transfer image data from camera or video file to buffer.

Migrate Template APIs

The template-based APIs have been updated as follows:

Old APIs New APIs
BarcodeReader.initRuntimeSettingsWithFile CaptureVisionRouter.initSettingsFromFile
BarcodeReader.initRuntimeSettingsWithString CaptureVisionRouter.initSettings
BarcodeReader.outputSettingsToFile CaptureVisionRouter.outputSettingsToFile
BarcodeReader.outputSettingsToString CaptureVisionRouter.outputSettings
BarcodeReader.resetRuntimeSettings CaptureVisionRouter.resetSettings
BarcodeReader.appendTplFileToRuntimeSettings Not available.
BarcodeReader.appendTplStringToRuntimeSettings Not available.
BarcodeReader.getAllParameterTemplateNames Not available.

Upgrade Template Files

The template file format has changed in the new version. Templates created for version 9.x are not compatible with version 11.x. Use the Template Upgrade Tool to automatically convert your existing templates to the new format.

Migrate Runtime Settings

The class PublicRuntimeSetting has been refactored. It retains commonly used properties via SimplifiedCaptureVisionSettings while removing the previously complex property settings, which are now exclusively supported through templates.

The APIs for accessing and updating runtime settings have been adjusted as follows:

Old APIs New APIs
BarcodeReader.getRuntimeSettings CaptureVisionRouter.getSimplifiedSettings
BarcodeReader.updateRuntimeSettings CaptureVisionRouter.updateSettings

Properties with Direct API Replacement

The following properties are replaced by similar properties under SimplifiedCaptureVisionSettings or SimplifiedBarcodeReaderSettings. They can also be set via a template file.

SimplifiedCaptureVisionSettings

PublicRuntimeSetting Property SimplifiedCaptureVisionSettings Parameter Template File Parameter
region roi & roiMeasuredInPercentage TargetROIDef.Location.Offset
timeout timeout CaptureVisionTemplates.Timeout

SimplifiedBarcodeReaderSettings

PublicRuntimeSetting Property SimplifiedBarcodeReaderSettings Property Template File Parameter
minBarcodeTextLength minBarcodeTextLength BarcodeFormatSpecification.BarcodeTextLengthRangeArray
minResultConfidence minResultConfidence BarcodeFormatSpecification.MinResultConfidence
localizationModes localizationModes BarcodeReaderTaskSetting.LocalizationModes
expectedBarcodesCount expectedBarcodesCount BarcodeReaderTaskSetting.ExpectedBarcodesCount
barcodeFormatIds barcodeFormatIds BarcodeReaderTaskSetting.BarcodeFormatIds
barcodeFormatIds_2 barcodeFormatIds BarcodeReaderTaskSetting.BarcodeFormatIds
deblurModes deblurModes BarcodeReaderTaskSetting.DeblurModes
deblurLevel deblurModes BarcodeReaderTaskSetting.DeblurModes
maxAlgorithmThreadCount maxThreadsInOneTask BarcodeReaderTaskSetting.MaxThreadsInOneTask
grayscaleTransformationModes grayscaleTransformationModes ImageParameter.GrayscaleTransformationModes
imagePreprocessingModes grayscaleEnhancementModes ImageParameter.GrayscaleEnhancementModes

Remarks:

  • The 2 groups of barcode formats are merged.
  • deblurLevel is deprecated. You can use deblurModes instead.
  • The mode IPM_MORPHOLOGY of imagePreprocessingModes is migrated to BinarizationModes. The mode arguments MorphOperation, MorphOperationKernelSizeX, MorphOperationKernelSizeY, MorphShape are now available for all modes of BinarizationModes.

Properties Requiring Template File

The following properties can only be set via a template file. Please call BarcodeReader.outputSettingsToFile first with the old version to export the settings and then use the Template Upgrade Tool to upgrade your template.

PublicRuntimeSetting Property Template File Parameter
scaleDownThreshold ImageParameter.ImageScaleSettings
binarizationModes ImageParameter.BinarizationModes
textResultOrderModes BarcodeReaderTaskSetting.TextResultOrderModes
returnBarcodeZoneClarity BarcodeReaderTaskSetting.ReturnBarcodeZoneClarity
scaleUpModes BarcodeReaderTaskSetting.BarcodeScaleModes
barcodeZoneMinDistanceToImageBorders BarcodeFormatSpecification.BarcodeZoneMinDistanceToImageBorders
colourConversionModes ImageParameter.ColourConversionModes
regionPredetectionModes BarcodeReaderTaskSetting.RegionPredetectionModes
textureDetectionModes ImageParameter.TextureDetectionModes
textFilterModes ImageParameter.TextDetectionMode & ImageParameter.IfEraseTextZone
dpmCodeReadingModes BarcodeReaderTaskSetting.DPMCodeReadingModes
deformationResistingModes BarcodeReaderTaskSetting.DeformationResistingModes
barcodeComplementModes BarcodeReaderTaskSetting.BarcodeComplementModes

Properties Migrated to Other APIs

The PDF properties of PublicRuntimeSetting are moved to set via the setPDFReadingParameter method of DirectoryFetcher and FileFetcher with a PDFReadingParameter parameter.

PublicRuntimeSetting Property
pdfReadingMode
pdfRasterDPI

Removed Properties (No Replacement)

The following properties are removed.

PublicRuntimeSetting Property
barcodeColourModes
intermediateResultTypes
intermediateResultSavingMode
resultCoordinateType
terminatePhase
FurtherModes Property
colourClusteringModes

This page is compatible for: