Skip to content

Commit c4e3853

Browse files
Merge pull request #24 from dynamsoft-docs/develop-flutter
Some more edits to Flutter and RN
2 parents 984f850 + 2c3f8bb commit c4e3853

File tree

3 files changed

+3
-114
lines changed

3 files changed

+3
-114
lines changed

programming/flutter/user-guide/index.md

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The Machine Readable Travel Documents (MRTD) standard specified by the Internati
2323
Currently, the SDK supports three types of MRTD:
2424

2525
> [!NOTE]
26-
> If you need support for other types of MRTDs, our SDK can be easily customized. Please contact support@dynamsoft.com.
26+
> If you need support for other types of MRTDs, our SDK can be easily customized. Please contact our [support team](https://www.dynamsoft.com/contact/).
2727
2828
### ID (TD1 Size)
2929

@@ -241,45 +241,7 @@ Once the scan process completes and the MRZ Scanner successfully recognizes a MR
241241

242242
Even though the default settings of the ready-to-use MRZ Scanner is sufficient to cover the majority of MRZ scanning scenarios, the [`MRZScannerConfig`](../api-reference/mrz-scanner-config.md) class allows you to change the behaviour of the MRZ Scanner to fit your specific scenario. Using this class can help you customize different UI elements and determine the settings of the scanner engine itself.
243243

244-
```dart
245-
var config = MRZScannerConfig(
246-
///The license key required to initialize the MRZ Scanner.
247-
license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9",
248-
249-
///Determines whether the torch (flashlight) button is visible in the scanning UI.
250-
///Set to true to display the torch button, enabling users to turn the flashlight on/off. Default is true.
251-
isTorchButtonVisible: true,
252-
253-
///Specifies the type of document to be scanned for MRZ.
254-
///This property accepts values defined in the EnumDocumentType, such as `EnumDocumentType.all`, `EnumDocumentType.id`, or `EnumDocumentType.passport`.
255-
///It helps the scanner to optimize its processing based on the expected document type.
256-
///Default is EnumDocumentType.all.
257-
documentType: EnumDocumentType.DT_ALL,
258-
259-
///Specifies if a beep sound should be played when an MRZ is successfully detected.
260-
///Set to true to enable the beep sound, or false to disable it. Default is false.
261-
isBeepEnabled: false,
262-
263-
///Determines whether the close button is visible on the scanner UI.
264-
///This button allows users to exit the scanning interface. Default is true.
265-
isCloseButtonVisible: true,
266-
267-
///Specifies whether the camera toggle button is displayed.
268-
///This button lets users switch between available cameras (e.g., front and rear). Default is false.
269-
isCameraToggleButtonVisible: false,
270-
271-
///Determines whether a guide frame is visible during scanning.
272-
///The guide frame assists users in properly aligning the document for optimal MRZ detection.
273-
///When set to true, a visual overlay is displayed on the scanning interface. Default is true.
274-
isGuideFrameVisible: true,
275-
276-
277-
///Specifies the template configuration for the MRZ scanner.
278-
///This can be either a file path or a JSON string that defines various scanning parameters.
279-
///Default is undefined, which means the default template will be used.
280-
templateFile: "JSON template string",
281-
);
282-
```
244+
To learn of the different ways in which the MRZ scanner can be customized, please refer to the [MRZ Scanner Customization Guide](customize-mrz-scanner.md).
283245

284246
## Run the Project
285247

programming/react-native/user-guide/customize-mrz-scanner.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ Next, we go over the different ways that these properties can be used to customi
4242

4343
## Setting the MRZ Document Type
4444

45-
### Set the document type via APIs
46-
4745
The MRZ Scanner reads all three MRZ formats, but it can optionally restrict the MRZ format that it reads. For example, you may want to configure MRZ scanner to only read **TD1** and passport (**TD3**) document types, while **ignoring TD2** documents. Here is a simple edit to the launchMrzScanner function that we implemented in the [User Guide](index.md) that sets the specific MRZ formats to read using the `documentType` property:
4846

4947
```ts

programming/react-native/user-guide/index.md

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -199,78 +199,7 @@ Once the scan process completes and the MRZ Scanner successfully recognizes a MR
199199

200200
Even though the default settings of the ready-to-use MRZ Scanner is sufficient to cover the majority of MRZ scanning scenarios, the `MRZScanConfig` class allows you to change the behaviour of the MRZ Scanner to fit your specific scenario. Using this class can help you customize different UI elements and determine the settings of the scanner engine itself.
201201

202-
```tsx
203-
import {MRZScanConfig, EnumDocumentType} from 'dynamsoft-mrz-scanner-bundle-react-native';
204-
205-
const config = {
206-
/**
207-
* The license key required to initialize the MRZ Scanner.
208-
*/
209-
license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", //The license string here grants a time-limited free trial which requires network connection to work.
210-
211-
/**
212-
* Determines whether the torch (flashlight) button is visible in the scanning UI.
213-
* Set to true to display the torch button, enabling users to turn the flashlight on/off. Default is true.
214-
*/
215-
isTorchButtonVisible: true,
216-
217-
/**
218-
* Specifies the type of document to be scanned for MRZ.
219-
* This property accepts values defined in the EnumDocumentType, such as {@link EnumDocumentType.DT_ALL}, {@link EnumDocumentType.DT_ID}, or {@link EnumDocumentType.DT_PASSPORT}.
220-
* It helps the scanner to optimize its processing based on the expected document type.
221-
* Default is EnumDocumentType.DT_ALL.
222-
*/
223-
documentType: EnumDocumentType.DT_ALL,
224-
225-
/**
226-
* Specifies if a beep sound should be played when an MRZ is successfully detected.
227-
* Set to true to enable the beep sound, or false to disable it. Default is false.
228-
*/
229-
isBeepEnabled: false,
230-
231-
/**
232-
* Determines whether a vibration is triggered upon a successful MRZ scan.
233-
* When enabled (true), the scanner will produce a brief vibration to provide visual feedback.
234-
* Default is false.
235-
*/
236-
isVibrateEnabled: false,
237-
238-
/**
239-
* Determines whether the close button is visible on the scanner UI.
240-
* This button allows users to exit the scanning interface. Default is true.
241-
*/
242-
isCloseButtonVisible: true,
243-
244-
/**
245-
* Specifies whether the camera toggle button is displayed.
246-
* This button lets users switch between available cameras (e.g., front and rear). Default is false.
247-
*/
248-
isCameraToggleButtonVisible: false,
249-
250-
/**
251-
* Determines whether a guide frame is visible during scanning.
252-
* The guide frame assists users in properly aligning the document for optimal MRZ detection.
253-
* When set to true, a visual overlay is displayed on the scanning interface. Default is true.
254-
*/
255-
isGuideFrameVisible: true,
256-
257-
258-
/**
259-
* Specifies the template configuration for the MRZ scanner.
260-
* This can be either a file path or a JSON string that defines various scanning parameters.
261-
* Default is undefined, which means the default template will be used.
262-
*/
263-
templateFile: {/*JSON template string*/},
264-
265-
/**
266-
* Provides a Node.js 'require' function to load the template file when running in a Node environment.
267-
* This facilitates importing external template configuration files.
268-
* Default is undefined, which means the default template will be used.
269-
* Only available when `templateFile` is set to undefined/null or empty string.
270-
*/
271-
templateNodeRequire: require('./settings.json'),
272-
} as MRZScanConfig;
273-
```
202+
To learn of the different ways in which the MRZ scanner can be customized, please refer to the [MRZ Scanner Customization Guide](customize-mrz-scanner.md).
274203

275204
## Run the Project
276205

0 commit comments

Comments
 (0)