Paragraph justification when optimized for `MsWordVersion.WORD_2016`

Hi Aspose team,

In our project, we need to ensure the document is rendered exactly the same as in the PDF export, but we’re facing difficulties replicating paragraph justification when optimized for MsWordVersion.WORD_2016.
It’s not entirely clear when the justification algorithm should squeeze in extra word(s) before applying a line break. Simply using a static value for the maximum amount of space shrinkage reveals that the algorithm must consider some additional factors, such as font type, style, or others.
Could you provide details on how Aspose handles justification when exporting with optimization for MsWordVersion.WORD_2016?

NOTE:
While MsWordVersion.WORD_2010 uses a greedy justification algorithm, this option isn’t suitable for us due to other layout differences compared to optimization for MsWordVersion.WORD_2016.

@abykovsky Do you mean Aspose.Words document layout algorithms? If so, unfortunately, we cannot share this information. Though you can use LayoutCollector and LayoutEnumerator to get limited information about the document layout.

Thank you for your prompt response.
Yes, I am referring to Aspose.Words document layout algorithms.
I will give LayoutCollector and LayoutEnumerator a try and see if they help.

1 Like

@abykovsky

I am afraid, we cannot share details of Aspose.Words internal implementation.