---
title: "Options and Appearance Word Document"
---


{{% alert color="grey" %}}

*Purpose Summary. What is this page about?*

This page demonstrates how to use Aspose.Words for Python to control document display options, page layout settings, language preferences, and compatibility optimizations for different Microsoft Word versions. It provides code examples for setting view options, page setup, language preferences, and optimizing documents for specific Word versions.

{{% /alert %}}

Sometimes you may need to change the appearance of a document, for example, set language preferences or the number of lines per page.Aspose.Words provides the ability to control how the document will be displayed, as well as some additional options. This article describes such possibilities.

## Set Document Display Options

You can control how a document will be displayed in Microsoft Word using the [ViewOptions](https://reference.aspose.com/words/python-net/aspose.words.settings/viewoptions/) class. For example, you can set a document zoom value using the [zoom_percent](https://reference.aspose.com/words/python-net/aspose.words.settings/viewoptions/zoom_percent/) property, or the view mode using the [view_type](https://reference.aspose.com/words/python-net/aspose.words.settings/viewoptions/view_type/) property.

The following code example shows how to ensure that a document is displayed at 50% when opened in Microsoft Word:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-Programming with Documents-Working with Document-working_with_document_options_and_settings-SetViewOption.py" >}}

{{% alert color="primary" %}}

You can download the template file for this example from [Aspose.Words GitHub](https://github.com/aspose-words/Aspose.Words-for-Python-via-.NET/blob/master/Examples/Data/Document.docx).

{{% /alert %}}

{{% alert color="primary" %}}

Microsoft Word 2013 does not write any zoom factor to a document and no longer sets the default zoom from the value written to the document, instead, it seems to use the zoom factor of the last open document.

{{% /alert %}}

## Set Page Display Options

If you want to set the number of characters per line, use the [characters_per_line](https://reference.aspose.com/words/python-net/aspose.words.pagesetup/characters_per_line/) property. You can also set the number of lines per page for a Word document – use the [lines_per_page](https://reference.aspose.com/words/python-net/aspose.words.pagesetup/lines_per_page/) property to get or set the number of lines per page in the document grid.

{{% alert color="primary" %}}

In Microsoft Word, you can set the same parameters using the "Document Grid" tab in the "Page Setup" dialog box only when Asian language support is installed.

{{% /alert %}}

The following code example shows how to set the number of characters per line and the number of lines per page for a Microsoft Word document:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-Programming with Documents-Working with Document-working_with_document_options_and_settings-DocumentPageSetup.py" >}}

## Set Language Preferences

Displaying a document in Microsoft Word depends on which languages are set as defaults for this document. If no languages are set in defaults, Microsoft Word takes information from the "Set Office Language Preferences" dialog box, which, for example, can be found under "File → Options → Language" in Microsoft Word 2019.

With Aspose.Words, you can also set up language preferences using the [LanguagePreferences](https://reference.aspose.com/words/python-net/aspose.words.loading/languagepreferences/) class. Also note that for the correct display of your document it is necessary to set the Microsoft Word version that the document loading process should match – this can be done using the [msw_version](https://reference.aspose.com/words/python-net/aspose.words.loading/loadoptions/msw_version/) property.

{{% alert color="primary" %}}

If your Aspose.Words generated document does not look as expected, check the [language_preferences](https://reference.aspose.com/words/python-net/aspose.words.loading/loadoptions/language_preferences/) and [msw_version](https://reference.aspose.com/words/python-net/aspose.words.loading/loadoptions/msw_version/) values and adjust them if necessary to match the settings for your Microsoft Word version.

{{% /alert %}}

The following code example shows how to add Japanese to editing languages:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-Programming with Documents-Working with Document-working_with_document_options_and_settings-AddJapaneseAsEditinglanguages.py" >}}

The following code example shows how to set Russian as the default editing language:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-Programming with Documents-Working with Document-working_with_document_options_and_settings-SetRussianAsDefaultEditingLanguage.py" >}}

## Optimize a Document for a Particular Word Version

The [optimize_for](https://reference.aspose.com/words/python-net/aspose.words.settings/compatibilityoptions/optimize_for/) method allows optimizing document content, as well as default Aspose.Words behaviour for a particular version of Microsoft Word. You can use this method to prevent Microsoft Word from displaying the “Compatibility mode” ribbon upon document loading. Note that you may also need to set the [compliance](https://reference.aspose.com/words/python-net/aspose.words.document/compliance/) property to [ISO2950_2008_TRANSITIONAL](https://reference.aspose.com/words/python-net/aspose.words.saving.ooxmlcompliance/#iso29500_2008_transitional) or higher.

The following code example shows how to optimize document content for Microsoft Word 2016:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-Programming with Documents-Working with Document-working_with_document_options_and_settings-OptimizeForMsWord.py" >}}

------ 

## FAQ

1. **Q:** How can I set the initial zoom level of a document when it is opened in Microsoft Word?  
   **A:** Use the `ViewOptions` class and set its `zoom_percent` property to the desired percentage (e.g., `50`). Then assign the `ViewOptions` instance to the document’s `view_options` property before saving.

2. **Q:** Which properties control the number of characters per line and lines per page in a document?  
   **A:** The `PageSetup` class provides `characters_per_line` and `lines_per_page`. Set these properties on the document’s `page_setup` object to define the document grid used by Word, especially for Asian language layouts.

3. **Q:** How do I add or change editing languages for a document?  
   **A:** Create a `LanguagePreferences` object, add the desired language codes (e.g., `"ja-JP"` for Japanese) to its `editing_languages` collection, and assign it to the `load_options.language_preferences` before loading or saving the document.

4. **Q:** What is the purpose of the `optimize_for` method, and when should I use it?  
   **A:** `optimize_for` configures compatibility options so the document opens without Word’s “Compatibility mode” ribbon for a specific Word version (e.g., `CompatibilityOptions.OptimizeFor.WORD_2016`). Use it when you need the document to behave like it was created in that version.

5. **Q:** How can I ensure the document renders correctly for a specific Microsoft Word version?  
   **A:** Set the `LoadOptions.msw_version` property to the target Word version (e.g., `MsWordVersion.WORD_2016`). This makes Aspose.Words emulate the rendering and layout behavior of that Word version during loading.