Hyphenation bug

Hi,

If I convert a WordML file containing paragraphs with hyphenation to Pdf using Aspose.Words 15.10.0 then the result Pdf file doesn’t show paragraphs with hyphenation and therefor the paragraphs float to the next page, see the attached samples. I hope you could fix that in the next release.

best regards
Alex

Hi Alex,

Thanks for your inquiry.We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-12613. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Alex,

Thanks for your patience. It is to inform you that our product team has completed the work on issue (WORDSNET-12613) and has come to a conclusion that this issue and the undesired behavior you’re observing is actually not a bug in Aspose.Words. So, we have closed this issue as ‘Not a Bug’.

Aspose.Words adds hyphenations correctly. We have found two reasons why the sample document is converted differently than MS Word does it.

  1. All runs in the document have a predefined language therefore Aspose.Words applies hyphen patterns taken from English dictionary (hyph_en_US.dic).

  2. The English hyphenation patterns dictionary (it’s loaded by default) does not contain necessary pattern(s). So, it is necessary to register the Latin patterns dictionary, and also to update language in the document to “la-Latn”. You can also achieve this by using following code example.

Hyphenation.RegisterDictionary("la-Latn", MyDir + "hyph_la_Latn.dic");
try
{
    Document doc = new Document(MyDir + "ReproSample.xml");
    foreach (Run run in doc.GetChildNodes(NodeType.Run, true))
    {
        run.Font.LocaleId = 1142;
    }
    doc.Save(MyDir + "Out.pdf");
}
finally
{
    Hyphenation.UnregisterDictionary("la-Latn");
}

There are many dictionaries on http://extensions.openoffice.org/. Please find the Latin dictionary and output document in attachment.