# FieldRedactionSettings Class

> FieldRedactionSettings class, defining the redaction appearance for a single field or for the Words To Redact input in the Redact Document activity.

`FieldRedactionSettings` is a public class that defines the redaction appearance for a single field, used by the [RedactionOptions](https://docs.uipath.com/activities/other/latest/document-understanding/redactionoptions-class) input of the [Redact Document](https://docs.uipath.com/activities/other/latest/document-understanding/redact-document) activity.

## Definition

* Namespace: `UiPath.DocumentProcessing.Contracts.Redaction`
* Assembly: `UiPath.DocumentProcessing.Contracts`

## Description

Each `FieldRedactionSettings` entry controls how the redaction box is drawn for a specific field, overriding the global redaction settings on the activity. When `FieldId` is empty, the entry applies to the values matched through the **Words To Redact** input instead of a taxonomy field.

## Members

### Properties

* `FieldId` `String` - The id of the taxonomy field the settings apply to. If empty, the settings apply to the **Words To Redact** input instead.
* `BorderColor` `String` - The border color of the redaction box, as a hexadecimal color string (for example, `000000`).
* `BorderSize` `Int?` - The border thickness of the redaction box.
* `RedactionCodeFontColor` `String` - The font color of the redaction code, as a hexadecimal color string.
* `RedactionCodeFontSize` `Int?` - The font size of the redaction code.
* `RedactionCode` `String` - The redaction code displayed on the redaction box.
* `FillColor` `String` - The fill color of the redaction box, as a hexadecimal color string.
* `FillOpacity` `Double?` - The opacity of the redaction box, from `0` (fully transparent) to `1` (fully opaque).
* `RedactionType` `RedactionType` - The redaction style applied to the box. For the available values, see [RedactionType](https://docs.uipath.com/activities/other/latest/document-understanding/redactiontype-enum).

## Property use by redaction type

The `RedactionType` value determines which appearance properties affect the output:

* `Fill` - Uses `FillColor` and `FillOpacity` to fill the entire redaction box, and `BorderColor` and `BorderSize` to draw the box border.
* `StrikeThrough` - Uses `FillColor` and `FillOpacity` to fill a horizontal band across the middle of the box. `BorderColor` and `BorderSize` are not used, because a strike-through has no border.

The `RedactionCode`, `RedactionCodeFontColor`, and `RedactionCodeFontSize` properties apply to both redaction types.

A `FillOpacity` of `0` makes the fill (or the strike-through band) fully transparent, so it is not painted. Because a strike-through has no solid fill behind the label, the `RedactionCodeFontColor` needs to contrast with the underlying page content to stay readable.

:::note
The `RedactionCode` label is drawn centered inside each redaction box. When `RedactionCodeFontSize` is not set, the label auto-sizes to about 70% of the box height and shrinks to fit the box width.

A value is redacted one line at a time: if its text wraps across two lines, it produces two redaction boxes, one per line. The redaction code is drawn on each box, so a value spanning two lines shows the `RedactionCode` label on both lines.
:::
