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.

Migrate to New Package

As of version 10.0, the dbr package has been renamed to dynamsoft-barcode-reader-bundle to reflect changes in both architecture and API design. Run the following command to install the new package:

pip install dynamsoft-barcode-reader-bundle

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.init_license LicenseManager.init_license

Migrate Decoding APIs

Single Image Decoding

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

Old APIs New APIs
BarcodeReader.decode_file CaptureVisionRouter.capture
BarcodeReader.decode_file_stream CaptureVisionRouter.capture
BarcodeReader.decode_buffer_manually CaptureVisionRouter.capture
BarcodeReader.decode_buffer CaptureVisionRouter.capture
class TextResult class BarcodeResultItem
BarcodeReader.decode_base64_string Not available.

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.init_runtime_settings_with_file CaptureVisionRouter.init_settings_from_file
BarcodeReader.init_runtime_settings_with_string CaptureVisionRouter.init_settings
BarcodeReader.output_settings_to_json_file CaptureVisionRouter.output_settings_to_file
BarcodeReader.output_settings_to_json_string CaptureVisionRouter.output_settings
BarcodeReader.reset_runtime_settings CaptureVisionRouter.reset_settings
BarcodeReader.append_template_file_to_runtime_settings Not available.
BarcodeReader.append_template_string_to_runtime_settings Not available.
BarcodeReader.get_all_template_names 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.get_runtime_settings CaptureVisionRouter.get_simplified_settings
BarcodeReader.update_runtime_settings CaptureVisionRouter.update_settings

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 & roi_measured_in_percentage TargetROIDef.Location.Offset
timeout timeout CaptureVisionTemplates.Timeout

SimplifiedBarcodeReaderSettings

PublicRuntimeSetting Property SimplifiedBarcodeReaderSettings Property Template File Parameter
min_barcode_text_length min_barcode_text_length BarcodeFormatSpecification.BarcodeTextLengthRangeArray
min_result_confidence min_result_confidence BarcodeFormatSpecification.MinResultConfidence
localization_modes localization_modes BarcodeReaderTaskSetting.LocalizationModes
expected_barcodes_count expected_barcodes_count BarcodeReaderTaskSetting.ExpectedBarcodesCount
barcode_format_ids barcode_format_ids BarcodeReaderTaskSetting.BarcodeFormatIds
barcode_format_ids_2 barcode_format_ids BarcodeReaderTaskSetting.BarcodeFormatIds
deblur_modes deblur_modes BarcodeReaderTaskSetting.DeblurModes
deblur_level deblur_modes BarcodeReaderTaskSetting.DeblurModes
max_algorithm_thread_count max_threads_in_one_task BarcodeReaderTaskSetting.MaxThreadsInOneTask
grayscale_transformation_modes grayscale_transformation_modes ImageParameter.GrayscaleTransformationModes
image_preprocessing_modes grayscale_enhancement_modes ImageParameter.GrayscaleEnhancementModes

Remarks:

  • The 2 groups of barcode formats are merged.
  • deblur_level is deprecated. You can use deblur_modes instead.
  • The mode IPM_MORPHOLOGY of image_preprocessing_modes 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.output_settings_to_json_file 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
scale_down_threshold ImageParameter.ImageScaleSettings
binarization_modes ImageParameter.BinarizationModes
text_result_order_modes BarcodeReaderTaskSetting.TextResultOrderModes
return_barcode_zone_clarity BarcodeReaderTaskSetting.ReturnBarcodeZoneClarity
scale_up_modes BarcodeReaderTaskSetting.BarcodeScaleModes
barcode_zone_min_distance_to_image_borders BarcodeFormatSpecification.BarcodeZoneMinDistanceToImageBorders
colour_conversion_modes ImageParameter.ColourConversionModes
region_predetection_modes BarcodeReaderTaskSetting.RegionPredetectionModes
texture_detection_modes ImageParameter.TextureDetectionModes
text_filter_modes ImageParameter.TextDetectionMode & ImageParameter.IfEraseTextZone
dpm_code_reading_modes BarcodeReaderTaskSetting.DPMCodeReadingModes
deformation_resisting_modes BarcodeReaderTaskSetting.DeformationResistingModes
barcode_complement_modes BarcodeReaderTaskSetting.BarcodeComplementModes

Properties Migrated to Other APIs

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

PublicRuntimeSetting Property
pdf_reading_mode
pdf_raster_dpi

Removed Properties (No Replacement)

The following properties are removed.

PublicRuntimeSetting Property
barcode_colour_modes
intermediate_result_types
intermediate_result_saving_mode
result_coordinate_type
terminate_phase
FurtherModes Property
colour_clustering_modes

This page is compatible for: