Aspose::Words::Settings::ViewType enum
Contents
[
Hide
]ViewType enum
Possible values for the view mode in Microsoft Word.
enum class ViewType : int
Values
| Name | Value | Description |
|---|---|---|
| None | 0 | The document shall be rendered in the default view of the application. |
| Normal | 4 | The document shall be rendered in a view optimized for outlining or creating long documents. |
| Outline | 3 | The document shall be rendered in a view optimized for outlining or creating long documents. |
| PageLayout | 1 | The document shall be opened in a view that displays the document as it will print. |
| Reading | 0 | The document shall be rendered in the default view of the application. |
| Web | 5 | The document shall be rendered in a view mimicking the way this document would be displayed in a web page. |
Examples
Shows how to set a custom zoom factor, which older versions of Microsoft Word will apply to a document upon loading.
auto doc = System::MakeObject<Aspose::Words::Document>();
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);
builder->Writeln(u"Hello world!");
doc->get_ViewOptions()->set_ViewType(ViewType::PageLayout);
doc->get_ViewOptions()->set_ZoomPercent(50);
ASSERT_EQ(doc->get_ViewOptions()->get_ZoomType(), ZoomType::Custom);
ASSERT_EQ(doc->get_ViewOptions()->get_ZoomType(), ZoomType::None);
doc->Save(get_ArtifactsDir() + u"ViewOptions.SetZoomPercentage.doc");
See Also
Namespace Aspose::Words::Settings
Library Aspose.Words for C++