# PdfRedactionSearchOptions

Explicit criteria used to derive reviewable redaction rectangles from logical content.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfRedactionSearchOptions.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L7)

**Implements**

`IPdfOperationCancellation`

**Modifiers**

sealed

Explicit criteria used to derive reviewable redaction rectangles from logical content.

## Inheritance

- object
- PdfRedactionSearchOptions

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Redact PDF Content](/docs/pdf/redaction/) Guide
  
  Find sensitive text with literal or regex searches, review the plan, remove the content and verify the redacted PDF with OfficeIMO.Pdf.
- [Redact literal text from a PDF](/pdf/redact/) Guide
  
  Find literal text matches, remove the matched PDF content, and verify extracted text, encoded strings, and decoded streams before download.

## Usage

Explore 5 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 4

- Method [PdfRedactionSearchOptions.AddFormField](/api/pdf/officeimo-pdf-pdfredactionsearchoptions/#method-addformfield-string)
- Method [PdfRedactionSearchOptions.AddLiteral](/api/pdf/officeimo-pdf-pdfredactionsearchoptions/#method-addliteral-string)
- Method [PdfRedactionSearchOptions.AddLogicalKind](/api/pdf/officeimo-pdf-pdfredactionsearchoptions/#method-addlogicalkind-officeimo-pdf-pdflogicalelementkind)
- Method [PdfRedactionSearchOptions.AddRegex](/api/pdf/officeimo-pdf-pdfredactionsearchoptions/#method-addregex-string)

### Accepted by parameters 1

- Method [PdfDocumentRedactions.Search](/api/pdf/officeimo-pdf-pdfdocumentredactions/#method-search-officeimo-pdf-pdfredactionsearchoptions-officeimo-pdf-pdftextlayoutoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken) parameter `search`

Filter members 

Show inherited

## Constructors

`public PdfRedactionSearchOptions()` [#](#constructor-ctor)

[PdfRedactionSearchOptions.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L7)

## Methods

`public PdfRedactionSearchOptions AddFormField(params string[] fieldNames)` [#](#method-addformfield-string)

[PdfRedactionSearchOptions.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L62)

Adds fully qualified AcroForm field names.

Parameters

**fieldNames string[] required**

Returns

`PdfRedactionSearchOptions`

`public PdfRedactionSearchOptions AddLiteral(params string[] values)` [#](#method-addliteral-string)

[PdfRedactionSearchOptions.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L56)

Adds literal text criteria.

Parameters

**values string[] required**

Returns

`PdfRedactionSearchOptions`

`public PdfRedactionSearchOptions AddLogicalKind(params PdfLogicalElementKind[] kinds)` [#](#method-addlogicalkind-officeimo-pdf-pdflogicalelementkind)

[PdfRedactionSearchOptions.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L65)

Adds logical element kinds such as Heading, ListItem, or TextBlock.

Parameters

**kinds OfficeIMO.Pdf.PdfLogicalElementKind[] required**

Returns

`PdfRedactionSearchOptions`

`public PdfRedactionSearchOptions AddRegex(params string[] patterns)` [#](#method-addregex-string)

[PdfRedactionSearchOptions.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L59)

Adds bounded regular-expression criteria.

Parameters

**patterns string[] required**

Returns

`PdfRedactionSearchOptions`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public bool MatchCase { get; set; }` [#](#property-matchcase)

[PdfRedactionSearchOptions.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L21)

Case-sensitive literal matching when true.

`public PdfRedactionTextSelection TextSelection { get; set; }` [#](#property-textselection)

[PdfRedactionSearchOptions.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L25)

Selection granularity for literal and regular-expression criteria. Defaults to complete logical blocks.

`public PdfRedactionContentScope ContentScope { get; set; }` [#](#property-contentscope)

[PdfRedactionSearchOptions.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L29)

Intersecting-content policy applied to generated areas. Defaults to text and underlay removal.

`public TimeSpan RegexTimeout { get; set; }` [#](#property-regextimeout)

[PdfRedactionSearchOptions.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L32)

Timeout applied independently to every regular-expression match.

`public int MaximumCandidates { get; set; }` [#](#property-maximumcandidates)

[PdfRedactionSearchOptions.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L35)

Maximum candidate rectangles produced before planning stops fail-closed.

`public ISet<int> PageNumbers { get; }` [#](#property-pagenumbers)

[PdfRedactionSearchOptions.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L38)

One-based pages to search. An empty set searches every page. Candidate limits apply only to these pages.

`public RegexOptions RegexOptions { get; set; }` [#](#property-regexoptions)

[PdfRedactionSearchOptions.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L41)

Regular-expression options. CultureInvariant is recommended for reproducible plans.

`public IList<string> LiteralText { get; }` [#](#property-literaltext)

[PdfRedactionSearchOptions.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L44)

Literal text criteria.

`public IList<string> RegularExpressions { get; }` [#](#property-regularexpressions)

[PdfRedactionSearchOptions.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L47)

Regular-expression criteria.

`public IList<string> FormFieldNames { get; }` [#](#property-formfieldnames)

[PdfRedactionSearchOptions.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L50)

Fully qualified AcroForm field names whose widgets should be selected.

`public ISet<PdfLogicalElementKind> LogicalElementKinds { get; }` [#](#property-logicalelementkinds)

[PdfRedactionSearchOptions.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRedactionSearchOptions.cs#L53)

Logical element kinds whose text blocks should be selected.

<!-- PowerForge markdown artifact sha256:DAC41FB33C9561BFE8636DA4AD7B05EDC78DBD44B951A9CD18AB7C083F62D7E4 -->
