# PdfHyphenationLexicon

Immutable, dependency-free dictionary of language-specific word hyphenation points.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfHyphenationLexicon.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfHyphenationLexicon.cs#L19)

**Modifiers**

sealed

Immutable, dependency-free dictionary of language-specific word hyphenation points.

## Inheritance

- object
- PdfHyphenationLexicon

## Remarks

Entries use an explicit marker, for example typog-ra-phy. The marker is removed from lookup text and its UTF-16 position becomes a preferred generated-PDF line break. Dictionary data remains caller-owned, so applications can ship only the languages they use.

## Usage

Explore 2 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.

### Accepted by parameters 2

- Method [PdfCreateOptions.UseTextHyphenationDictionary](/api/pdf/officeimo-pdf-pdfcreateoptions/#method-usetexthyphenationdictionary-officeimo-pdf-pdfhyphenationlexicon) parameter `dictionary`
- Method [PdfPageBuilder.TextHyphenationDictionary](/api/pdf/officeimo-pdf-pdfpagebuilder/#method-texthyphenationdictionary-officeimo-pdf-pdfhyphenationlexicon) parameter `dictionary`

Filter members 

Show inherited

## Constructors

`public PdfHyphenationLexicon(IEnumerable<string> hyphenatedWords, char breakMarker = '-', int minimumPrefixLength = 2, int minimumSuffixLength = 2)` [#](#constructor-ctor-collections-generic-ienumerable-system-string-char-int32-int32)

[PdfHyphenationLexicon.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfHyphenationLexicon.cs#L19)

Creates a case-insensitive hyphenation dictionary from marked words.

Parameters

**hyphenatedWords System.Collections.Generic.IEnumerable<string> required**

Words containing one or more explicit break markers.

**breakMarker char = '-' optional**

Marker removed from entries and converted into a break position.

**minimumPrefixLength int = 2 optional**

Minimum UTF-16 word length retained before a break.

**minimumSuffixLength int = 2 optional**

Minimum UTF-16 word length retained after a break.

## Methods

`public PdfTextHyphenationCallback AsCallback()` [#](#method-ascallback)

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

Creates the callback shape consumed by [PdfCreateOptions.SetTextHyphenation](/api/pdf/officeimo-pdf-pdfcreateoptions/).

Returns

`PdfTextHyphenationCallback`

`public bool Contains(string token)` [#](#method-contains-string)

[PdfHyphenationLexicon.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfHyphenationLexicon.cs#L46)

Returns true when the normalized word is present.

Parameters

**token string required**

Returns

`bool`

`public IReadOnlyList<int> GetBreakpoints(string token)` [#](#method-getbreakpoints-string)

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

Returns preferred UTF-16 break positions for a word, or an empty list when it is not present.

Parameters

**token string required**

Returns

`IReadOnlyList<int>`

## 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 char BreakMarker { get; }` [#](#property-breakmarker)

[PdfHyphenationLexicon.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfHyphenationLexicon.cs#L28)

Marker used by the source dictionary.

`public int MinimumPrefixLength { get; }` [#](#property-minimumprefixlength)

[PdfHyphenationLexicon.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfHyphenationLexicon.cs#L31)

Minimum UTF-16 length retained before each returned break.

`public int MinimumSuffixLength { get; }` [#](#property-minimumsuffixlength)

[PdfHyphenationLexicon.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfHyphenationLexicon.cs#L34)

Minimum UTF-16 length retained after each returned break.

`public int Count { get; }` [#](#property-count)

[PdfHyphenationLexicon.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfHyphenationLexicon.cs#L37)

Number of normalized words in the dictionary.

<!-- PowerForge markdown artifact sha256:3FECAAA16A3B25652852AF626264A676A2E3887245D8B9B69C0065979380235A -->
