Hyphenation.RegisterDictionary
Hyphenation RegisterDictionary method. Registers and loads a hyphenation dictionary for the specified language from a stream. Throws if dictionary cannot be read or has invalid format.
RegisterDictionary(string, Stream)
Registers and loads a hyphenation dictionary for the specified language from a stream. Throws if dictionary cannot be read or has invalid format.
public void RegisterDictionary(string language, Stream stream)
| Parameter | Type | Description |
|---|---|---|
| language | String | A language name, e.g. “en-US”. See .NET documentation for “culture name” and RFC 4646 for details. |
| stream | Stream | A stream for the dictionary file in OpenOffice format. |
Examples
Shows how to register hyphenation dictionary from stream.
using (Stream dictionary = File.OpenRead(MyDir + "hyph_en_US.dic"))
Wordize.Settings.Hyphenation.RegisterDictionary("en-us", dictionary);
Converter.Convert(MyDir + "SimpleHyphenation.docx", ArtifactsDir + "Hyphenation.Stream.pdf");
See Also
- class Hyphenation
- namespace Wordize
- assembly Wordize
RegisterDictionary(string, string)
Registers and loads a hyphenation dictionary for the specified language from file. Throws if dictionary cannot be read or has invalid format.
This method can also be used to register Null dictionary to prevent Callback from being called repeatedly for the same language.
public void RegisterDictionary(string language, string fileName)
| Parameter | Type | Description |
|---|---|---|
| language | String | A language name, e.g. “en-US”. See .NET documentation for “culture name” and RFC 4646 for details. |
| fileName | String | A path to the dictionary file in Open Office format. |
Examples
Shows how to register hyphenation dictionary.
Wordize.Settings.Hyphenation.RegisterDictionary("en-us", MyDir + "hyph_en_US.dic");
Converter.Convert(MyDir + "SimpleHyphenation.docx", ArtifactsDir + "Hyphenation.pdf");
See Also
- class Hyphenation
- namespace Wordize
- assembly Wordize