Hi,
I use Aspose to generate a word document, there are many paragraphs with text justification, the issue is that the last line of a paragraph is justified but when there are not enought words many spaces are added.
If I open the document in office word, and go to Options => Advanced => Page layout => choose option “Dont expand character spaces on a line that ends with SHIFT RETURN”, the paragraphs seems to be good.
How can i turn on this option using Aspose ?
I have attached the document, you can turn on this option and view the difference.
Thank you
Hi Tarik,
Thanks for your inquiry. Please use CompatibilityOptions.DoNotExpandShiftReturn property to achieve your requirements. Please read about CompatibilityOptions from here:
https://reference.aspose.com/words/net/aspose.words.settings/compatibilityoptions/
Document doc = new Document(MyDir + "Example_justify.doc");
doc.CompatibilityOptions.DoNotExpandShiftReturn = true;
doc.Save(MyDir + "Out.docx");