# Creating templates to apply to PDF files

{% hint style="info" %}
**Required dataset permission:** Edit dataset settings
{% endhint %}

A dataset might contain multiple files that have the same structure, such as a set of scanned-in forms.

Instead of adding the same manual overrides for each file, you can use a PDF file in the dataset to create a template that you can apply to other PDF files in the dataset.

When you [edit a PDF file](https://docs.tonic.ai/textual/dataset-configure-redaction/pdf-manual-overrides/pdf-edit-single-file), you can apply a template.

## Creating a PDF template

To add a PDF template to a dataset:

1. On the **Dataset settings** page, under **PDF Settings**, click **PDF Templates**.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FyFZS10dJCvpk91nJt9Ku%2FDatasetSettingsPDFSettings.png?alt=media&#x26;token=cc1eaa9d-cdd1-4970-8b76-7c65e0068f75" alt=""><figcaption><p>PDF Templates option on the PDF Settings section of the Dataset ssettings page</p></figcaption></figure>

2. On the template creation and selection panel, click **Create a New Template**.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2F67tBUiLvamUuX88WQgT7%2FPDFTemplates_NoTemplates.png?alt=media&#x26;token=9852080e-9439-45ab-9cc7-367ac2b6df1b" alt=""><figcaption><p>Panel with option to create a PDF template</p></figcaption></figure>

3. On the template details page:
   1. In the **Name** field, provide a name for the template.
   2. From the file dropdown list, select the dataset file to use to create the template.
   3. Add the manual overrides to the file.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2Fecm56368nvkWpoZS4vVR%2FPDFTemplateDetails.png?alt=media&#x26;token=428df9df-1a34-4975-9095-16d6835a0027" alt=""><figcaption><p>PDF template details panel for a new template</p></figcaption></figure>

4. When you finish adding the manual overrides, click **Save New Template**.

## Updating an existing PDF template <a href="#pdf-template-update" id="pdf-template-update"></a>

When you update a PDF template, it affects any files that use the template.

To update a PDF template:

1. On the **Dataset settings** page, under **PDF Settings**, click **PDF Templates**.
2. Under **Edit an Existing Template**, select the template, then click **Edit Selected Template**.
3. On the template details panel, you can change the template name, and add or remove manual overrides.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FcuRYStJYnsjIjHfEqx5L%2FPDFTemplateDetails_Update.png?alt=media&#x26;token=c456701b-4a05-4ba1-905e-6a7ec6e9002d" alt=""><figcaption><p>Template details panel for an existing template.</p></figcaption></figure>

4. To save the changes, click **Update Template**.

## Managing the manual overrides <a href="#pdf-template-manage-overrides" id="pdf-template-manage-overrides"></a>

### Adding a manual override <a href="#pdf-template-override-add" id="pdf-template-override-add"></a>

On the template details panel, to add a manual override to a file:

1. Select the type of override.\
   \
   To indicate to ignore any automatically detected values in the selected area, click **Ignore Redactions**.\
   \
   To indicate to redact the selected area, click **Add Manual Redaction**.
2. Use the mouse to draw a box around the area to select.

Tonic Textual adds the override to the **Redactions** list. The icon indicates the type of override.

### Navigating to a manual override <a href="#pdf-template-navigate-to-override" id="pdf-template-navigate-to-override"></a>

To select and highlight a manual override in the file content, in the **Redactions** list, click the navigate icon for the override.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2Fj59RnAkKSDMgkAPMhSLU%2FRedactionsNavigateIcon.png?alt=media&#x26;token=3d2a0c88-663d-4190-bf0c-fedc611b041b" alt=""><figcaption><p>Redactions list of manual overrides with a navigate icon highlighted</p></figcaption></figure>

### Removing a manual override <a href="#pdf-template-remove-override" id="pdf-template-remove-override"></a>

To remove a manual override, in the **Redactions** list, click the delete icon for the override.

## Deleting a PDF template <a href="#pdf-template-delete" id="pdf-template-delete"></a>

When you delete a PDF template, the template and its manual overrides are removed from any files that the template was assigned to.

To delete a PDF template:

1. On the **Dataset settings** page, under **PDF Settings**, click **PDF Templates**.
2. Under **Edit an Existing Template**, select the template, then click **Edit Selected Template**.
3. On the template details panel, click **Delete**.
