API Reference

Class

PdfHyphenationLexicon

Namespace OfficeIMO.Pdf
Assembly OfficeIMO.Pdf
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

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

Accepted by parameters

Constructors

public PdfHyphenationLexicon(IEnumerable<String> hyphenatedWords, Char breakMarker = '-', Int32 minimumPrefixLength = 2, Int32 minimumSuffixLength = 2) #

Creates a case-insensitive hyphenation dictionary from marked words.

Parameters

hyphenatedWords System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
Words containing one or more explicit break markers.
breakMarker System.Char = '-' optionalposition: 1
Marker removed from entries and converted into a break position.
minimumPrefixLength System.Int32 = 2 optionalposition: 2
Minimum UTF-16 word length retained before a break.
minimumSuffixLength System.Int32 = 2 optionalposition: 3
Minimum UTF-16 word length retained after a break.

Methods

public PdfTextHyphenationCallback AsCallback() #
Returns: PdfTextHyphenationCallback

Creates the callback shape consumed by PdfTextHyphenationCallback).

public Boolean Contains(String token) #
Returns: Boolean

Returns true when the normalized word is present.

Parameters

token System.String requiredposition: 0
public IReadOnlyList<Int32> GetBreakpoints(String token) #
Returns: IReadOnlyList<Int32>

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

Parameters

token System.String requiredposition: 0

Properties

public Char BreakMarker { get; } #

Marker used by the source dictionary.

public Int32 MinimumPrefixLength { get; } #

Minimum UTF-16 length retained before each returned break.

public Int32 MinimumSuffixLength { get; } #

Minimum UTF-16 length retained after each returned break.

public Int32 Count { get; } #

Number of normalized words in the dictionary.