How to customize your barcode reader parameter template

Starting from Dynamsoft Barcode Reader version 6, it is recommended to set all barcode reading configurations in the template (*.json). This article will talk about how to customize your own template based on our standard templates on our online demo.

  1. Open our online demo here.

  2. Modify the settings to fit the needs of your project .

  3. Export the template

    • Export as RuntimeSettings and use InitRuntimeSettingsWithString method to initialize the settings at runtime. Below is an example:
    BarcodeReader reader = new BarcodeReader();
    reader.LicenseKeys = "t0260NwAAAHV***************";
    string errorMessage;
    reader.InitRuntimeSettingsWithString("{\"Version\":\"2.0\", \"ImageParameter\":{\"Name\":\"IP1\", \"BarcodeFormatIds\":[\"QR_CODE\"], \"ExpectedBarcodesCount\":10, \"AntiDamageLevel\":3}}", EnumConflictMode.ECM_Overwrite, out errorMessage);
    
    • Export as Template and use AppendTplFileToRuntimeSettings method to append a new template file to current runtime settings. Below is an example:
    BarcodeReader reader = new BarcodeReader();
    reader.LicenseKeys = "t0260NwAAAHV***************";
    string errorMessage;
    reader.AppendTplFileToRuntimeSettings(@"C:\Program Files (x86)\Dynamsoft\Barcode Reader 6.4\Templates\RuntimeSettings.json", EnumConflictMode.ECM_Overwrite, out errorMessage);
    

results matching ""

    No results matching ""