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. Click the button "Upload Your Template >" or "Create Teamplate >". The template files can be found under [Installation folder]\Barcode Reader {Version Info}\Templates\ .

    Upload Your Template

  3. Expand the template box and click "Modify Template".

    Modify Settings

  4. Modify the settings to fit the needs of your project and download the template as a JSON file.

    Download Template

  5. Specify the template name when reading barcodes in the code. Below is an example:

     BarcodeReader dbr = new BarcodeReader();
     dbr.LicenseKeys = "f0068MgAAACgHGsO*****"; // replace the license key with your own
     dbr.AppendParameterTemplateFromFile(@"C:\Users\Claire\Downloads\Default_Template.json");
     TextResult[] aryResult = dbr.DecodeFile(@"C:\Program Files (x86)\Dynamsoft\Barcode Reader 6.1\Images\AllSupportedBarcodeTypes.tif", "Default_Template");
    

    Below is the JSON string in the file Default_Template.json:

    {
    "ImageParameters": {
     "Name": "Default_Template",
     "BarcodeFormatIds": [
       "All"
     ],
     "DeblurLevel": 5,
     "AntiDamageLevel": 5,
     "TextFilterMode": "Enable"
    },
    "Version": "1.0"
    }
    

results matching ""

    No results matching ""