> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/products/idv-suite/flujos-and-integraciones/configuracion-tecnica-del-cliente/sdk-mobile/idv-mobile/componente-documento.md).

# Component - Document

<figure><img src="/files/66f8a56190d6af4331f2614372ff3b2698f16efc" alt="" width="324"><figcaption></figcaption></figure>

The Document Capture must be configured.

<figure><img src="/files/1ca2efd21e1aade8030c4a7967ab3bd70d1df327" alt="" width="263"><figcaption></figcaption></figure>

To do this, we tap the gear icon; if it has a red dot, it means there is a required parameter that has not been configured and we will not be able to save the Flow.

#### Tutorial before capture

Type: Boolean

Default: Enabled

Parameter name in the SDK: *showTutorial*

If enabled, the mobile app will show an information icon (i) in the upper-right corner of the "Initial tip before capture" view; this button shows a more detailed tutorial on how to perform the capture.

#### Initial tip before capture

Type: Boolean

Default: Enabled

Parameter name in the SDK: *showPreviousTip*

If enabled, the mobile app will show a view with a brief tutorial before launching the capture process.

#### Error diagnostics screen

Type: Boolean

Default: Enabled

Parameter name in the SDK: *showDiagnostic*

If enabled, the mobile app will show a view indicating the specific error that prevented the capture process from being completed. Each error is handled differently, and some views will present buttons to close, retry, or even go to the device settings.

#### Preview captured image

Type: Boolean

Default: Enabled

Parameter name in the SDK: *showResultAfterCapture*

If enabled, the mobile app will show a view with the captured image so the user can confirm whether it looks correct or prefers to take it again.

#### Enable vibration during capture

Type: Boolean

Default: Enabled

Parameter name in the SDK: *vibrationEnabled*

If enabled, the mobile app will provide feedback to the user through haptic pulses (vibrations).

#### Document Capture wizard mode

Type: Boolean

Default: Enabled

Parameter name in the SDK: *wizardMode*

If enabled, the process is configured to capture both sides (front and back) of the document one after the other. In this mode the Widget would be launched only once and, after finishing capturing the front, it would continue with the back if the document has one.

#### Document Capture scan mode

Type: Selector

Default: Search mode

Parameter name in the SDK: *scanMode*

Indicates the OCR scanning mode for documents. Depending on the choice, several types of documents or one specific document will be scanned and searched for. This mode can be of three types:

* **Generic mode (*****MODE\_GENERIC*****)**: allows any type of document to be scanned regardless of the country or the document type. The result of this mode is not as accurate as the following ones, but it allows several standard documents to be scanned.
* **Search mode (*****MODE\_SEARCH*****)**: will allow the use of a whitelist and blacklist, and will search among documents that meet those conditions. These conditions are indicated in the "Country" variable (*specificData*). This makes it possible to perform the search by narrowing the number of templates, making the search much more refined than in the generic case.
* **Specific mode (*****MODE\_SPECIFIC*****)**: Search for a specific document. These conditions are indicated in the "Country" property (*specificData*) shown below.

### No document selector

#### Country

Type: String

Default: ES|\<ALL>

Parameter name in the SDK: *specificData*

This property allows you to define which documents will be scanned during the process, if the scan mode *search* or *specific*. The example *ES|\<ALL>* indicates that it will scan for **all** documents issued by Spain.

The country key must be its ISO2 code.

#### Document type

Type: Selector

Default: ID Card

Parameter name in the SDK: *documentType*

The document type to be read.

* **ID Card**: The Widget is configured to capture identity documents.
* **Passport**: The Widget is configured to capture passports.
* **Visa**: The Widget is configured to capture visas.
* **Driver's license**: The Widget is configured to capture driving licenses.
* **Foreigner card**: The Widget is configured to capture foreign documents.
* **Credit card**: The Widget is configured to capture credit cards.
* **Custom**: The Widget is configured to capture other types of documents that do not correspond to any of the previous categories.

### With document selector

#### **showDocumentSelector**

Type: Boolean

Default: *false*

Parameter name in the SDK: *showDocumentSelector*

Activation of the document selector view. It will be presented as soon as the controller is launched.

#### **enabledCountries**

Type: Array of Strings \[String]

Default: *null*

Parameter name in the SDK: *enabledCountries*

List of ISO2 countries that will appear in the selector. If its value is null or does not contain valid values, all those available through the SDK will be shown.

#### **enabledDocumentTypes**

Type: Array of Strings \[String]

Default: *null*

Parameter name in the SDK: *enabledDocumentTypes*

List of document types that will appear in the document types selector. If its value is null or does not contain values, all those available through the SDK will be shown.

### Advanced parameters

#### Side to capture

Type: Selector

Default: Front

Parameter name in the SDK: *documentSide*

The side of the document with which capture begins. This parameter does NOT define whether only one side or both sides will be captured.

#### Resource file

Type: String

Default: *empty - FILL IN*

Parameter name in the SDK: *resourcesPath*

The name of the zip file delivered along with the FPHISelphIDWidget dependency. This file must be found under that same name among the assets of the application that integrates the Flow.

The usual zip name structure is resources-${PRODUCT}-{$VERSION}.zip (i.e. *resources-selphid-2-0.zip)*

#### Enable debug mode

Type: Boolean

Default: Disabled

Parameter name in the SDK: *debug*

If enabled, capture will be done in *debug.*

#### Maximum capture time

Type: Selector

Default: Medium

Parameter name in the SDK: *timeout*

The time elapsed from when capture starts until a Timeout error occurs due to *timeout.*

*Short 15s - Medium 20s - Long 25s - Very Long 60s*

#### Token image quality

Type: Float

Default: *empty - The SDK will use 0.95*

Parameter name in the SDK: *tokenImageQuality*

Decimal value between 0 and 1 that indicates the compression of the tokenized image used for verification services.

#### Video file path

Type: String

Default: *empty*

Parameter name in the SDK: *videoFilename*

If the value is different from empty, the document capture process will be recorded as an .mp4 at the indicated path, so the integrator can retrieve it by accessing it.

#### Parameters\*

Type: Dictionary \<String,String>

Default: *empty*

Parameter name in the SDK: *params*

This dictionary is for specific configurations and should only be used when indicated by Facephi due to a special use case.
