Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
Method | Description |
---|---|
InitRuntimeSettingsWithFile |
Initializes runtime settings with the settings in a given JSON file. |
InitRuntimeSettingsWithString |
Initializes runtime settings with the settings in a given JSON string. |
AppendTplFileToRuntimeSettings |
Appends a new template file to the current runtime settings. |
AppendTplStringToRuntimeSettings |
Appends a new template string to the current runtime settings. |
GetAllParameterTemplateNames |
Gets the parameter templates name array. |
OutputSettingsToFile |
Outputs runtime settings to a settings file (JSON file). |
OutputSettingsToString |
Outputs runtime settings to a string. |
Initialize runtime settings with the settings in a given JSON file.
EnumErrorCode Dynamsoft.DBR.BarcodeReader.InitRuntimeSettingsWithFile(string jsonFileName, EnumConflictMode conflictMode, out string errorMessage)
Parameters
[in] jsonFileName
<string> : The path of the settings file.
[in] conflictMode
<EnumConflictMode> : The parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template.
[in,out] errorMessage
<string> : Output parameter storing detailed error message.
Return Value
Returns error code.
Code Snippet
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
string errorMessage;
EnumErrorCode error = reader.InitRuntimeSettingsWithFile(@"C:\Program Files (x86)\Dynamsoft\{Version number}\Templates\RuntimeSettings.json", EnumConflictMode.CM_OVERWRITE, out errorMessage);
reader.Dispose();
Initialize runtime settings with the settings in given JSON string.
EnumErrorCode Dynamsoft.DBR.BarcodeReader.InitRuntimeSettingsWithString(string jsonContent, EnumConflictMode conflictMode, out string errorMessage)
Parameters
[in] jsonContent
<string> : A JSON string that represents the content of the settings.
[in] conflictMode
<EnumConflictMode> : The parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template.
[in,out] errorMessage
<string> : Output parameter storing detailed error message.
Return Value
Returns error code.
Code Snippet
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
string errorMessage;
EnumErrorCode error = reader.InitRuntimeSettingsWithString("{\"Version\":\"3.0\", \"ImageParameter\":{\"Name\":\"IP1\", \"BarcodeFormatIds\":[\"BF_QR_CODE\"], \"ExpectedBarcodesCount\":10}}", EnumConflictMode.CM_OVERWRITE, out errorMessage);
reader.Dispose();
Append a new template file to the current runtime settings.
EnumErrorCode Dynamsoft.DBR.BarcodeReader.AppendTplFileToRuntimeSettings(string jsonFileName, EnumConflictMode conflictMode, out string errorMessage)
Parameters
[in] jsonFileName
<string> : The path of the settings file.
[in] conflictMode
<EnumConflictMode> : The parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template.
[in,out] errorMessage
<string> : Output parameter storing detailed error message.
Return Value
Returns error code.
Code Snippet
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
string errorMessage;
EnumErrorCode error = reader.AppendTplFileToRuntimeSettings(@"C:\Program Files (x86)\Dynamsoft\Barcode Reader 6.4\Templates\RuntimeSettings.json", EnumConflictMode.CM_OVERWRITE, out errorMessage);
reader.Dispose();
Append a new template string to the current runtime settings.
EnumErrorCode Dynamsoft.DBR.BarcodeReader.AppendTplStringToRuntimeSettings(string jsonContent, EnumConflictMode conflictMode, out string errorMessage)
Parameters
[in] jsonContent
<string> : A JSON string that represents the content of the settings.
[in] conflictMode
<EnumConflictMode> : The parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template.
[in,out] errorMessage
<string> : Output parameter storing detailed error message.
Return Value
Returns error code.
Code Snippet
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
string errorMessage;
EnumErrorCode error = reader.AppendTplStringToRuntimeSettings("{\"Version\":\"3.0\", \"ImageParameter\":{\"Name\":\"IP1\", \"BarcodeFormatIds\":[\"BF_QR_CODE\"], \"ExpectedBarcodesCount\":10}}", EnumConflictMode.CM_IGNORE, out errorMessage);
reader.Dispose();
Gets the parameter templates name array.
string[] Dynamsoft.DBR.BarcodeReader.GetAllParameterTemplateNames()
Return Value
The template name array.
Code Snippet
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
string errorMessage;
reader.InitRuntimeSettingsWithFile(@"C:\Program Files (x86)\Dynamsoft\{Version number}\Templates\RuntimeSettings.json", EnumConflictMode.CM_OVERWRITE, out errorMessage);
reader.AppendTplStringToRuntimeSettings("{\"Version\":\"3.0\", \"ImageParameter\":{\"Name\":\"IP1\", \"BarcodeFormatIds\":[\"BF_QR_CODE\"], \"ExpectedBarcodesCount\":10}}", EnumConflictMode.CM_IGNORE, out errorMessage);
string[] templateNameArray = reader.GetAllParameterTemplateNames();
reader.Dispose();
Output runtime settings to a settings file (JSON file).
void Dynamsoft.DBR.BarcodeReader.OutputSettingsToFile(string outputFilePath, string settingsName)
Parameters
[in] outputFilePath
<string> : The output file path which stores current settings.
[in] settingsName
<string> : A unique name for declaring current runtime settings.
Exception
BarcodeReaderException
The exception thrown by Dynamsoft Barcode Reader.
Code Snippet
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
string errorMessage;
reader.InitRuntimeSettingsWithFile(@"C:\Program Files (x86)\Dynamsoft\{Version number}\Templates\RuntimeSettings.json", EnumConflictMode.CM_OVERWRITE, out errorMessage);
reader.AppendTplStringToRuntimeSettings("{\"Version\":\"3.0\", \"ImageParameter\":{\"Name\":\"IP1\", \"BarcodeFormatIds\":[\"BF_QR_CODE\"], \"ExpectedBarcodesCount\":10}}", EnumConflictMode.CM_IGNORE, out errorMessage);
reader.OutputSettingsToFile(@"C:\Program Files (x86)\Dynamsoft\{Version number}\Templates\CurrentRuntimeSettings.json", "currentRuntimeSettings");
reader.Dispose();
Output runtime settings to a string.
string Dynamsoft.DBR.BarcodeReader.OutputSettingsToString(string settingsName)
Parameters
[in] settingsName
<string> : A unique name for declaring current runtime settings.
Return Value
The output string which stores the contents of current settings.
Exception
BarcodeReaderException
The exception thrown by Dynamsoft Barcode Reader.
Code Snippet
BarcodeReader reader = new BarcodeReader();
reader.ProductKeys = "t0260NwAAAHV***************";
string errorMessage;
reader.InitRuntimeSettingsWithFile(@"C:\Program Files (x86)\Dynamsoft\{Version number}\Templates\RuntimeSettings.json", EnumConflictMode.CM_OVERWRITE, out errorMessage);
reader.AppendTplStringToRuntimeSettings("{\"Version\":\"3.0\", \"ImageParameter\":{\"Name\":\"IP1\", \"BarcodeFormatIds\":[\"BF_QR_CODE\"], \"ExpectedBarcodesCount\":10}}", EnumConflictMode.CM_IGNORE, out errorMessage);
string currentSettings = reader.OutputSettingsToString("currentRuntimeSettings");
reader.Dispose();
latest version