gembox-document

Activate automatic hyphenation with GemBox Document


How can one activate the automatic hyphenation for created word documents?
In word, the option is under Layout->Hyphenation(Group "Page Setup"), however I was not able to find this setting in the document model.


Solution

  • EDIT (2020-05-22)

    In the current latest version (GemBox.Document 3.1), there is API support for AutoHyphenation.
    For example, try using this:

    var document = DocumentModel.Load("Input.docx");
    document.HyphenationOptions.AutoHyphenation = true;
    

    ORIGINAL

    In the current version (GemBox.Document 2.5) this is not supported through an API, it's supported only through preservation.

    In other words, when loading a DOCX file, which has this option enabled, into a DocumentModel and then saving that DocumentModel into a DOCX file, the resulting output DOCX file will have that option enabled as well. But when changing the output file's format into something other than the input format (for example to PDF, XPS, HTML, etc.) then the preserved information is lost.

    Last as a feedback reference can you specify exactly for what output file format do you require this?