PdfHyphenationLexicon
OfficeIMO.Pdf
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
Constructors
public PdfHyphenationLexicon(IEnumerable<string> hyphenatedWords, char breakMarker = '-', int minimumPrefixLength = 2, int minimumSuffixLength = 2) #Creates a case-insensitive hyphenation dictionary from marked words.
Parameters
- hyphenatedWords System.Collections.Generic.IEnumerable<string>
- Words containing one or more explicit break markers.
- breakMarker char = '-'
- Marker removed from entries and converted into a break position.
- minimumPrefixLength int = 2
- Minimum UTF-16 word length retained before a break.
- minimumSuffixLength int = 2
- Minimum UTF-16 word length retained after a break.
Methods
public PdfTextHyphenationCallback AsCallback() #Creates the callback shape consumed by PdfCreateOptions.SetTextHyphenation.
Returns
PdfTextHyphenationCallbackpublic bool Contains(string token) #Returns true when the normalized word is present.
Parameters
- token string
Returns
boolpublic IReadOnlyList<int> GetBreakpoints(string token) #Returns preferred UTF-16 break positions for a word, or an empty list when it is not present.
Parameters
- token string
Returns
IReadOnlyList<int>