We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Can't get hyphenation to work

To my understanding, Aspose Words can be used to hyphenate an input document.
I use the following code but no word is hyphenated in the output document.

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Aspose.Words.License license = new Aspose.Words.License();

Document testDoc = new Document("in.docx");
Hyphenation.RegisterDictionary("en-US", "hyph_en_US.dic");
testDoc.Save("out.pdf", SaveFormat.Pdf);

The input document contains a table with a column too small for the words in it. In Word, they are cut off (no hypen) and continue on the next line.
The output document looks exactly the same, while I expected the words to be hyphenated at the correct places.

I've tried library versions 14.12 and 15.3, different language cultures, different output file types and different document generation methods, none to any success.

Hi Roel,

Thanks for your inquiry. Please attach your input Word document, hyphenation dictionary file and output PDF file showing the undesired behavior here for testing. Please also Save your Word document As PDF and attach it here for our reference. We will investigate the issue on our end and provide you more information.

Best regards,

Thanks in advance. Attached are the files I used and the results I get.

Hi Roel,

Thanks for your inquiry. Aspose.Words mimics the way the Microsoft Word works; this means that if you convert your Word document into PDF using Aspose.Words, the output will appear almost exactly as if it was done by Microsoft Word (please see a couple of PDF documents attached here with this post). You can observe that Aspose.Words and MS Word 2013 both produce identical output. If we can help you with anything else, please feel free to ask.

Best regards,

Thank you. Switching hyphenation on in the input document did the trick.

Since I produce documents created from multiple sources, could you also explain how I can use Aspose’s hyphenation functionality when no input docx is involved?

Like in the following example:

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

Hyphenation.RegisterDictionary(“en-US”, @“Dictionary\hyph_en_US.dic”);


builder.CellFormat.Width = 60;







Hi Roel,

I am in coordination with product team to get answer pertaining to your queries. Soon you will be updated with the required information.

Best regards,

Hi Roel,

We have logged your requirement in our issue tracking system as WORDSNET-11801. Our product team will further look into the details of this problem and we will keep you updated on the status of this issue. We apologize for your inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-11801) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for .NET 18.12 update and this Aspose.Words for Java 18.12 update.