# Read

The **Read** function reads text, signatures, and form data from PDF documents.

***

## Properties <a href="#properties" id="properties"></a>

### Input <a href="#input" id="input"></a>

The following properties specify the PDF document to be loaded and modified by the operation:

#### File path <a href="#file-path" id="file-path"></a>

Path to the PDF file.

#### Authentication type <a href="#authentication-type" id="authentication-type"></a>

PDF files can be protected using a password or a certificate. This field indicates which type of authentication to attempt when loading the PDF.

1. **None**\
   The document is unprotected and can be opened immediately.
2. **Password**\
   The document is protected by a password.
3. **Certificate**\
   The document is protected by a certificate.

**Password**:

Only displayed when **Authentication type** is 'Password'.

* **Password**: Password required to access the PDF file.

{% hint style="info" %}

> **Note:**\
> All passwords entered into this function's properties will be visible in plain text in the Linx solution file and in the compiled .NET assembly.
> {% endhint %}

**Certificate**:

Only displayed when **Authentication type** is 'Certificate'.

**Certificate source**:\
Source to load the certificate from:

1. **File** - Load a certificate from a .pfx file.
2. **Store** - Load a certificate from the Windows certificate store.

**File**

Displayed when **Certificate source** is 'File'.

* **Certificate file path**: Path to a .pfx file containing a certificate.
* **Certificate file password**: Password needed to open the certificate file.

**Store**:\
Displayed when **Certificate source** is 'Store'.

* **Certificate**: Certificate in the Windows keystore.

{% hint style="info" %}

> **Note:**\
> Certificate protected files are not supported by the "Fill form," "Sign," "Add watermark," and "Concatenate" operations. If you need to use the operations on a certificate-protected document, first remove the certificate protection using the "Change protection" operation. The certificate must include the private key in order to be able to load the document.
> {% endhint %}

***

### Output <a href="#output" id="output"></a>

#### Read text <a href="#read-text" id="read-text"></a>

Reads the document text and returns it in an output parameter named "Text".

#### Read form data <a href="#read-form-data" id="read-form-data"></a>

Reads any form data present in the document.

#### Read signatures <a href="#read-signatures" id="read-signatures"></a>

Reads any signatures present in the document.

***

**Read form data**\
Only displayed when the **Read form data** property is selected.

* **Return form data as**: Controls how the form data is returned.

  **Options**:

  1. **Custom type** - Form data is used to populate an existing Type.
  2. **Infer type from a sample PDF** - Return type is constructed based on a sample PDF document.
  3. **List** - Form data is returned as a list of entries.

**Custom type**

Displayed when 'Custom type' is selected for **Read form data as**.

* **Form data type**: The expected type for the document's form data.
* **Property mapping**: Specify the field names that the properties in the form data should map to.

**Infer type from a sample PDF**

Displayed when 'Infer type from a sample PDF' is selected for **Read form data as**.

* **Sample PDF**: A sample PDF containing the empty form.
* **Property mapping**: Specify the field names that the properties in the form data should map to.

***

**Read text**:\
Only displayed when the **Read text** property is selected.

* **Extraction strategy**: Extraction strategy to use when reading the text from the document.

  **Options**:

  * **Location**
  * **Simple**
  * **Top to bottom**
* **Split text**: Controls how the document text is split.

  **Options**:

  * **Never** - Text is never split; all text in the document is returned as a single string value.
  * **Per page** - Text is split per page and returned in a list of strings with one entry per page.
