# PdfTextWhitespaceMode

Controls spacing and wrapping of ordinary spaces in generated flow text.

Enum 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`1d5ef38d1e0b` with working tree changes

**Source**

[PdfTextWhitespaceMode.cs:4](https://github.com/EvotecIT/OfficeIMO/blob/1d5ef38d1e0bc45ee35fa9829701a5d52fd16d26/OfficeIMO.Pdf/Options/PdfTextWhitespaceMode.cs#L4)

**Base**

`Enum`

**Implements**

`IComparable` `ISpanFormattable` `IFormattable` `IConvertible`

**Modifiers**

sealed

Controls spacing and wrapping of ordinary spaces in generated flow text.

## Inheritance

- Enum
- PdfTextWhitespaceMode

## 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 5

- Property [PdfCreateOptions.TextWhitespaceMode](/api/pdf/officeimo-pdf-pdfcreateoptions/#property-textwhitespacemode)
- Property [PdfParagraphStyle.TextWhitespaceMode](/api/pdf/officeimo-pdf-pdfparagraphstyle/#property-textwhitespacemode)
- Field [PdfTextWhitespaceMode.Collapse](/api/pdf/officeimo-pdf-pdftextwhitespacemode/#field-collapse)
- Field [PdfTextWhitespaceMode.Preformatted](/api/pdf/officeimo-pdf-pdftextwhitespacemode/#field-preformatted)
- Field [PdfTextWhitespaceMode.Preserve](/api/pdf/officeimo-pdf-pdftextwhitespacemode/#field-preserve)

Filter members 

Show inherited

## Inherited Methods

`public int CompareTo(object? target)` [#](#method-compareto-object)

Inherited from Enum

Parameters

**target object? required**

Returns

`int`

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

Inherited from Enum

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from Enum

Returns

`int`

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

Inherited from object

Returns

`Type`

`public TypeCode GetTypeCode()` [#](#method-gettypecode)

Inherited from Enum

Returns

`TypeCode`

`public bool HasFlag(Enum flag)` [#](#method-hasflag-enum)

Inherited from Enum

Parameters

**flag Enum required**

Returns

`bool`

ToString 4 overloads

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

Inherited from Enum

Returns

`string`

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

Inherited from Enum

Parameters

**format string? required**

Returns

`string`

`public string ToString(IFormatProvider? provider)` [#](#method-tostring-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString() instead.")`

Parameters

**provider IFormatProvider? required**

Returns

`string`

`public string ToString(string? format, IFormatProvider? provider)` [#](#method-tostring-string-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString(String) instead.")`

Parameters

**format string? required**

**provider IFormatProvider? required**

Returns

`string`

## Values

`public const PdfTextWhitespaceMode Collapse` [#](#field-collapse)

[PdfTextWhitespaceMode.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/1d5ef38d1e0bc45ee35fa9829701a5d52fd16d26/OfficeIMO.Pdf/Options/PdfTextWhitespaceMode.cs#L6)

Collapses repeated spaces and discards spaces at the start of a line.

Value: `0`

`public const PdfTextWhitespaceMode Preserve` [#](#field-preserve)

[PdfTextWhitespaceMode.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/1d5ef38d1e0bc45ee35fa9829701a5d52fd16d26/OfficeIMO.Pdf/Options/PdfTextWhitespaceMode.cs#L8)

Preserves spaces within a line and discards excess spaces when they wrap.

Value: `1`

`public const PdfTextWhitespaceMode Preformatted` [#](#field-preformatted)

[PdfTextWhitespaceMode.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/1d5ef38d1e0bc45ee35fa9829701a5d52fd16d26/OfficeIMO.Pdf/Options/PdfTextWhitespaceMode.cs#L10)

Preserves literal spacing, including additional blank lines when spaces wrap.

Value: `2`

<!-- PowerForge markdown artifact sha256:53DCFE130382DE3F9BFCF486F5DB7A389C697F3704314856FB30F822204F75F6 -->
