justification_mode property

Document.justification_mode property

Gets or sets the character spacing adjustment of a document.

@property
def justification_mode(self) -> aspose.words.settings.JustificationMode:
    ...

@justification_mode.setter
def justification_mode(self, value: aspose.words.settings.JustificationMode):
    ...

Examples

Shows how to manage character spacing control.

doc = aw.Document(file_name=MY_DIR + 'Document.docx')
justification_mode = doc.justification_mode
if justification_mode == aw.settings.JustificationMode.EXPAND:
    doc.justification_mode = aw.settings.JustificationMode.COMPRESS
doc.save(file_name=ARTIFACTS_DIR + 'Document.SetJustificationMode.docx')

See Also