# Redacted PDF and image files

## Format of a PDF or image file preview <a href="#pdf-image-preview-format" id="pdf-image-preview-format"></a>

For a PDF or image file preview:

* On the left, the preview displays the original data. The detected entity values are highlighted.
* On the right, the preview displays the data with replacement values that are based on the dataset configuration for the detected entity types.

For entity types that use the **Redact** handling option, the value is covered by a black box.

The preview for a PDF file also reflects any [manual edits](https://docs.tonic.ai/textual/dataset-configure-redaction/pdf-manual-overrides).

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FBVGTvFvWu2F9APPxwHMa%2FDatasetFilePreview_PDF.png?alt=media&#x26;token=91730eaa-998b-43d5-adc3-4c2f869321a9" alt=""><figcaption><p>File preview for a redacted PDF file</p></figcaption></figure>

## Selecting entity type handling options <a href="#pdf-image-preview-entity-type-handling" id="pdf-image-preview-entity-type-handling"></a>

From a PDF or image file preview, to select the [entity type handling option](https://docs.tonic.ai/textual/dataset-configure-redaction/textual-datasets-select-handling-type#handling-options-available) for an entity type:

1. In the results panel, click a detected value.\
   \
   For a PDF file, you can click the value in either the source or the results panel.
2. On the details panel, click the entity type handling option. Textual applies the same option to all entity values of that type.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FHV8YV3pq7VrbWqQYjEtm%2FDatasetPreviewEntityTypeHandling.png?alt=media&#x26;token=5ca223f2-a7f8-4b79-8003-376e133d37cb" alt=""><figcaption><p>Selecting an entity type handling option</p></figcaption></figure>

From the preview, you can only select the entity type handling option. For the **Synthesis** option, you cannot configure synthesis options for an entity type. You must configure those options from the dataset details page. For more information, go to [textual-datasets-synthesis-options](https://docs.tonic.ai/textual/dataset-configure-redaction/textual-datasets-synthesis-options "mention").

## Ignoring specific instances in PDF files <a href="#pdf-preview-ignore-instance" id="pdf-preview-ignore-instance"></a>

From a PDF file preview, you can choose to ignore a specific value:

1. In the source or results panel, click the value.
2. On the details panel, to ignore the value, toggle **Ignore** to the on position.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FqGokFO0QsVok9OU8hNYk%2FDatasetFilePreview_PDFEditInstance.png?alt=media&#x26;token=ccbb1297-533d-4150-b4c2-75c10c9bfb6f" alt=""><figcaption><p>Panel with the option to ignore a PDF value</p></figcaption></figure>

## **Adding and removing manual redactions** <a href="#manual-redaction-pdf-image" id="manual-redaction-pdf-image"></a>

### **Adding manual redactions** <a href="#manual-redaction-pdf-add" id="manual-redaction-pdf-add"></a>

For a PDF or image file, to change to redaction mode, click **Add Redaction**.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2F0yoZPEK7SRFgtxYg4ceG%2FDatasetFilePreviewAddRedaction.png?alt=media&#x26;token=79d887de-572a-430b-8fd9-43c9f7d10e2c" alt=""><figcaption><p>Add Redaction option for a PDF or image</p></figcaption></figure>

The **Add Redaction** button changes to **Done**.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FwStYANf6zW9RXLwtUR3S%2FDatasetFilePreviewRedactionDone.png?alt=media&#x26;token=fdc72c78-f2dc-4d5a-b342-8871bf91e880" alt=""><figcaption><p>Done button to exit redaction mode for a PDF option</p></figcaption></figure>

While in redaction mode, to add a redaction:

1. In the source text panel on the left, draw a box around the content to redact.
2. On the redaction details panel, from the dropdown list, select the entity type for the redaction.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2F3l11nTf95XBUFmqHQH7o%2FFilePreviewPDFRedactionInitial.png?alt=media&#x26;token=64f9ef1c-0f43-42ae-aa65-5385e7d1c69e" alt=""><figcaption><p>Redaction details panel before the entity type is selected</p></figcaption></figure>

2. Click **Add Redaction**.

To exit redaction mode, click **Done**.

### **Viewing the count of manual redactions for a page** <a href="#manual-redaction-pdf-page-count" id="manual-redaction-pdf-page-count"></a>

The file preview heading displays the count of manual redactions on the current page of the file.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FJ5AVXzakJDL0rpAbSncX%2FDatasetFilePreviewPDFPageManualCount.png?alt=media&#x26;token=bab9f085-982b-4cc8-819b-fa156cef1823" alt=""><figcaption><p>Count of manual redactions on the current page</p></figcaption></figure>

### **Removing a manual redaction** <a href="#manual-redaction-pdf-remove" id="manual-redaction-pdf-remove"></a>

To remove a manual redaction from a PDF or image file:

1. In either the source or output panel, click the redaction.
2. On the redaction details panel, click **Delete Redaction**.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FIgDb1nIA1FaE8maetVnV%2FDatasetFilePreviewPDFDeleteRedaction.png?alt=media&#x26;token=45b1b59d-084f-4223-9836-4986585ba64b" alt=""><figcaption><p>Delete Redaction option for a manual redaction</p></figcaption></figure>
