# WordFinderConfig Class

> A word finder configuration that customizes the way the extraction is performed.In the default configuration, all options are false.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/WordFinderConfig
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/llms.txt

```java
class WordFinderConfig
```

**Namespace:** `com::datalogics::PDFL`

## Description

A word finder configuration that customizes the way the extraction is performed.In the default configuration, all options are false.

**Referenced by:** [`DocTextFinder`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/DocTextFinder.md), [`WordFinder`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/WordFinder.md)

## Constructors

### WordFinderConfig

```java
com.datalogics.PDFL.WordFinderConfig.WordFinderConfig()
```

*constructor*

A word finder configuration that customizes the way the extraction is performed.In the default configuration, all options are false.

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.WordFinderConfig.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.WordFinderConfig.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.WordFinderConfig.finalize()
```

*protected*

**Returns:** `void`

### getDisableCharReordering

```java
boolean com.datalogics.PDFL.WordFinderConfig.getDisableCharReordering()
```

**Returns:** `boolean`

When true, it disables reconstructing the character orders, and the word finding algorithm is applied to the characters in the drawing order. By default, word finder reorders characters on a single line by the relative horizontal character locations. Most of the time, the character reordering feature improves the text extraction quality. However, on a PDF page with heavily overlapped character bounding boxes, the outcome becomes somewhat unpredictable. In such case, disabling the character reordering (disableCharReordering = true) may produce a more static result.

### getDisableTaggedPDF

```java
boolean com.datalogics.PDFL.WordFinderConfig.getDisableTaggedPDF()
```

**Returns:** `boolean`

When true, it disables tagged PDF support and treats the document as non-tagged PDF. Use this to keep the word finder in legacy mode when it is created with the latest algorithm version.

### getIgnoreCharGaps

```java
boolean com.datalogics.PDFL.WordFinderConfig.getIgnoreCharGaps()
```

**Returns:** `boolean`

When true, it disables converting large character gaps to space characters, so that the word finder reports a character space only when a space character appears in the original PDF content. This option has no effect on tagged PDF.

### getIgnoreLineGaps

```java
boolean com.datalogics.PDFL.WordFinderConfig.getIgnoreLineGaps()
```

**Returns:** `boolean`

When true, it disables treating vertical movements as line breaks, so that the word finder determines a line break only when a line break character or special tag information appears in the original PDF content. This option has no effect on tagged PDF.

### getNoAnnots

```java
boolean com.datalogics.PDFL.WordFinderConfig.getNoAnnots()
```

**Returns:** `boolean`

When true, it disables extracting text from text annotations. Normally, the word finder extracts text from the normal appearances of text annotations that are inside the page crop box.

### getNoEncodingGuess

```java
boolean com.datalogics.PDFL.WordFinderConfig.getNoEncodingGuess()
```

**Returns:** `boolean`

When true, it disables guessing encoding of fonts that have unknown or custom encoding when there is no ToUnicode table. Inappropriate encoding conversions can cause the word finder to mistakenly recognize non-Roman single-byte fonts as Standard Roman encoding fonts and extract the text in an unusable format. When this option is selected, the word finder avoids such unreliable encoding conversions and tries to provide the original characters without any encoding conversion for a client with its own encoding handling.

### getNoExtCharOffset

```java
boolean com.datalogics.PDFL.WordFinderConfig.getNoExtCharOffset()
```

**Returns:** `boolean`

When true, it disables generating extended character offset information to improve text extraction performance. The extended character offset information is necessary to determine exact character offset for character-by-character text selection. The beginning character offset of each word is always available regardless of this option, and can be used for word-by-word text selection with reasonable accuracy. When a client has no need for the detailed character offset information, it can use this option to improve the text extraction efficiency. There is a minor difference in the text extraction performance, and less memory is needed for the extracted word list.

### getNoHyphenDetection

```java
boolean com.datalogics.PDFL.WordFinderConfig.getNoHyphenDetection()
```

**Returns:** `boolean`

When true, it disables finding and removing soft hyphens in non-tagged PDF, so that the word finder trusts hard hyphens as non-soft hyphens. This option has no effect on tagged PDF files. Normally, the word finder does not differentiate between soft and hard hyphen characters in non-tagged PDF files, because these are often misused.

### getNoLigatureExp

```java
boolean com.datalogics.PDFL.WordFinderConfig.getNoLigatureExp()
```

**Returns:** `boolean`

When true, it disables the expansion of ligatures using the default ligatures. The default ligatures are:
fi

ff

fl

ffi

ffl

ch

cl

ct

ll

ss

fs

st

oe

OE

### getNoSkewedQuads

```java
boolean com.datalogics.PDFL.WordFinderConfig.getNoSkewedQuads()
```

**Returns:** `boolean`

When true, it disables the creation of a quad per character for skewed words, words with a horizontally-aligned, but non-rectangular, bounding region. Each skewed word will, instead, be associated with a single rectangular, bounding region.

### getNoStyleInfo

```java
boolean com.datalogics.PDFL.WordFinderConfig.getNoStyleInfo()
```

**Returns:** `boolean`

When true, it disables generating character style information to improve text extraction performance and memory efficiency. When you select this option, you cannot access the the StyleTransition property of Word objects returned from WordFinder.

### getNoTextRenderMode3

```java
boolean com.datalogics.PDFL.WordFinderConfig.getNoTextRenderMode3()
```

**Returns:** `boolean`

When true, it disables extracting text with Text Rendering mode Tr = 3 ("Neither fill nor stroke text (invisible)."). Normally, the word finder extracts such text as any other.

### getNoXYSort

```java
boolean com.datalogics.PDFL.WordFinderConfig.getNoXYSort()
```

**Returns:** `boolean`

When true, it disables generating an XY-ordered word list.

### getPreciseQuad

```java
boolean com.datalogics.PDFL.WordFinderConfig.getPreciseQuad()
```

**Returns:** `boolean`

When true, the bounding box or bounding quad will be set based on actual glyph bounding box.

### getPreserveRedundantChars

```java
boolean com.datalogics.PDFL.WordFinderConfig.getPreserveRedundantChars()
```

**Returns:** `boolean`

When true, it disables detecting and removing redundant characters. Some PDF pages have the same text drawn multiple times on the same spot to get a special visual effect. Normally, those redundant characters are removed from the word finder output.

Since this option may leave extra characters with overlapping bounding boxes, using it together with the disableCharReordering option is recommended for more consistent text extraction results.

### getPreserveSpaces

```java
boolean com.datalogics.PDFL.WordFinderConfig.getPreserveSpaces()
```

**Returns:** `boolean`

When true, the word finder preserves space characters during word breaking. Otherwise, spaces are removed from output text. When false (the default), you can add spaces later by considering the WordAttributeFlags.AdjacentToSpace attribute, but there is no way to restore the exact number of consecutive space characters.

### getTrustNBSpace

```java
boolean com.datalogics.PDFL.WordFinderConfig.getTrustNBSpace()
```

**Returns:** `boolean`

When true, it disables treating non-breaking space characters as regular space characters in non-tagged PDF files, so that the word finder preserves the space without breaking the word. This option has no effect on tagged PDF files. Normally, the word finder does not differentiate between breaking and non-breaking space characters in non-tagged PDF files, because these are often misused.

### getUnknownToStdEnc

```java
boolean com.datalogics.PDFL.WordFinderConfig.getUnknownToStdEnc()
```

**Returns:** `boolean`

When true, it assumes any font with unknown or custom encoding to be Standard Roman. This option overrides the noEncodingGuess option.

### setDisableCharReordering

```java
void com.datalogics.PDFL.WordFinderConfig.setDisableCharReordering(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables reconstructing the character orders, and the word finding algorithm is applied to the characters in the drawing order. By default, word finder reorders characters on a single line by the relative horizontal character locations. Most of the time, the character reordering feature improves the text extraction quality. However, on a PDF page with heavily overlapped character bounding boxes, the outcome becomes somewhat unpredictable. In such case, disabling the character reordering (disableCharReordering = true) may produce a more static result.

### setDisableTaggedPDF

```java
void com.datalogics.PDFL.WordFinderConfig.setDisableTaggedPDF(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables tagged PDF support and treats the document as non-tagged PDF. Use this to keep the word finder in legacy mode when it is created with the latest algorithm version.

### setIgnoreCharGaps

```java
void com.datalogics.PDFL.WordFinderConfig.setIgnoreCharGaps(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables converting large character gaps to space characters, so that the word finder reports a character space only when a space character appears in the original PDF content. This option has no effect on tagged PDF.

### setIgnoreLineGaps

```java
void com.datalogics.PDFL.WordFinderConfig.setIgnoreLineGaps(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables treating vertical movements as line breaks, so that the word finder determines a line break only when a line break character or special tag information appears in the original PDF content. This option has no effect on tagged PDF.

### setNoAnnots

```java
void com.datalogics.PDFL.WordFinderConfig.setNoAnnots(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables extracting text from text annotations. Normally, the word finder extracts text from the normal appearances of text annotations that are inside the page crop box.

### setNoEncodingGuess

```java
void com.datalogics.PDFL.WordFinderConfig.setNoEncodingGuess(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables guessing encoding of fonts that have unknown or custom encoding when there is no ToUnicode table. Inappropriate encoding conversions can cause the word finder to mistakenly recognize non-Roman single-byte fonts as Standard Roman encoding fonts and extract the text in an unusable format. When this option is selected, the word finder avoids such unreliable encoding conversions and tries to provide the original characters without any encoding conversion for a client with its own encoding handling.

### setNoExtCharOffset

```java
void com.datalogics.PDFL.WordFinderConfig.setNoExtCharOffset(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables generating extended character offset information to improve text extraction performance. The extended character offset information is necessary to determine exact character offset for character-by-character text selection. The beginning character offset of each word is always available regardless of this option, and can be used for word-by-word text selection with reasonable accuracy. When a client has no need for the detailed character offset information, it can use this option to improve the text extraction efficiency. There is a minor difference in the text extraction performance, and less memory is needed for the extracted word list.

### setNoHyphenDetection

```java
void com.datalogics.PDFL.WordFinderConfig.setNoHyphenDetection(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables finding and removing soft hyphens in non-tagged PDF, so that the word finder trusts hard hyphens as non-soft hyphens. This option has no effect on tagged PDF files. Normally, the word finder does not differentiate between soft and hard hyphen characters in non-tagged PDF files, because these are often misused.

### setNoLigatureExp

```java
void com.datalogics.PDFL.WordFinderConfig.setNoLigatureExp(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables the expansion of ligatures using the default ligatures. The default ligatures are:
fi

ff

fl

ffi

ffl

ch

cl

ct

ll

ss

fs

st

oe

OE

### setNoSkewedQuads

```java
void com.datalogics.PDFL.WordFinderConfig.setNoSkewedQuads(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables the creation of a quad per character for skewed words, words with a horizontally-aligned, but non-rectangular, bounding region. Each skewed word will, instead, be associated with a single rectangular, bounding region.

### setNoStyleInfo

```java
void com.datalogics.PDFL.WordFinderConfig.setNoStyleInfo(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables generating character style information to improve text extraction performance and memory efficiency. When you select this option, you cannot access the the StyleTransition property of Word objects returned from WordFinder.

### setNoTextRenderMode3

```java
void com.datalogics.PDFL.WordFinderConfig.setNoTextRenderMode3(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables extracting text with Text Rendering mode Tr = 3 ("Neither fill nor stroke text (invisible)."). Normally, the word finder extracts such text as any other.

### setNoXYSort

```java
void com.datalogics.PDFL.WordFinderConfig.setNoXYSort(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables generating an XY-ordered word list.

### setPreciseQuad

```java
void com.datalogics.PDFL.WordFinderConfig.setPreciseQuad(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, the bounding box or bounding quad will be set based on actual glyph bounding box.

### setPreserveRedundantChars

```java
void com.datalogics.PDFL.WordFinderConfig.setPreserveRedundantChars(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables detecting and removing redundant characters. Some PDF pages have the same text drawn multiple times on the same spot to get a special visual effect. Normally, those redundant characters are removed from the word finder output.

Since this option may leave extra characters with overlapping bounding boxes, using it together with the disableCharReordering option is recommended for more consistent text extraction results.

### setPreserveSpaces

```java
void com.datalogics.PDFL.WordFinderConfig.setPreserveSpaces(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, the word finder preserves space characters during word breaking. Otherwise, spaces are removed from output text. When false (the default), you can add spaces later by considering the WordAttributeFlags.AdjacentToSpace attribute, but there is no way to restore the exact number of consecutive space characters.

### setTrustNBSpace

```java
void com.datalogics.PDFL.WordFinderConfig.setTrustNBSpace(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it disables treating non-breaking space characters as regular space characters in non-tagged PDF files, so that the word finder preserves the space without breaking the word. This option has no effect on tagged PDF files. Normally, the word finder does not differentiate between breaking and non-breaking space characters in non-tagged PDF files, because these are often misused.

### setUnknownToStdEnc

```java
void com.datalogics.PDFL.WordFinderConfig.setUnknownToStdEnc(boolean value)
```

**Parameters**

- `value` (`boolean`)

**Returns:** `void`

When true, it assumes any font with unknown or custom encoding to be Standard Roman. This option overrides the noEncodingGuess option.
