|
5 | 5 |
|
6 | 6 | #you can change the following four variables' value to your own value.
|
7 | 7 | license_key = "Input your own license"
|
8 |
| -#license_server = "Input the name/IP of the license server" |
9 | 8 | input_json_string = '{"ImageParameter" : { "BarcodeFormatIds" : [ "BF_ALL" ], "DeblurLevel" : 9, "Description" : "", "ExpectedBarcodesCount" : 0, "MaxAlgorithmThreadCount" : 4, "Name" : "IP_1", "Timeout" : 10000}, "Version" : "3.0"}'
|
10 | 9 | append_json_string = '{"ImageParameter" : { "BarcodeFormatIds" : [ "BF_ALL" ], "DeblurLevel" : 9, "Description" : "", "ExpectedBarcodesCount" : 15, "MaxAlgorithmThreadCount" : 2, "Name" : "IP_2", "Timeout" : 20000}, "Version" : "3.0"}'
|
11 | 10 | #conflict_mode should be a value which is in EnumConflictMode.
|
12 | 11 | conflict_mode = EnumConflictMode.CM_OVERWRITE
|
13 | 12 |
|
14 | 13 | reader = BarcodeReader()
|
15 | 14 |
|
16 |
| -# Apply for a trial license: https://www.dynamsoft.com/CustomerPortal/Portal/Triallicense.aspx |
| 15 | +# Apply for a trial license: https://www.dynamsoft.com/customer/license/trialLicense |
17 | 16 | reader.init_license(license_key)
|
18 | 17 |
|
19 |
| -#reader.init_license_from_server(license_server, license_key) |
20 |
| -#license_content = reader.output_license_to_string() |
21 |
| -#reader.init_license_from_license_content(license_key, license_content) |
| 18 | +## The code snippet below shows how to use the full license in DBR 8.x: |
| 19 | +# connection_paras = BarcodeReader.init_lts_connection_parameters() |
| 20 | +## If DBR service is already built on your server, you can fill in the address of your server, or leave this property's default value. |
| 21 | +# connection_paras.main_server_url = "Input your own server url" |
| 22 | +# connection_paras.handshake_code = "Input your own handshake" |
| 23 | +# connection_paras.deployment_type = EnumDMDeploymentType.DM_DT_DESKTOP |
| 24 | +# connection_paras.uuid_generation_method = EnumDMUUIDGenerationMethod.DM_UUIDGM_RANDOM |
| 25 | +# try: |
| 26 | +# error = BarcodeReader.init_licesne_from_lts(connection_paras) |
| 27 | +# if error[0] != EnumErrorCode.DBR_OK: |
| 28 | +# print(error[1]) |
| 29 | +# except BarcodeReaderError as bre: |
| 30 | +# print(bre) |
22 | 31 |
|
23 | 32 | error = reader.init_runtime_settings_with_string(input_json_string)
|
24 | 33 | if error[0] != EnumErrorCode.DBR_OK:
|
|
0 commit comments