View Options

View options are used to define document view and zoom when a document is viewed in an application such as Microsoft Word.

Following example demonstrates how to set document view type and zoom.

View Options Screenshot
using GemBox.Document;

class Program
{
    static void Main(string[] args)
    {
        // If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        DocumentModel document = new DocumentModel();

        document.Sections.Add(
            new Section(document,
                new Paragraph(document, "GemBox.Document is a .NET component that enables developers to read, write, convert and print document files (DOCX, DOC, PDF, HTML, XPS, RTF and TXT) from .NET applications in a simple and efficient way.")));

        document.ViewOptions.ViewType = ViewType.Print;
        document.ViewOptions.Zoom = %Zoom%;

        document.Save("View Options.docx");
    }
}
Imports GemBox.Document

Module Program

    Sub Main()

        ' If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY")

        Dim document As DocumentModel = New DocumentModel

        document.Sections.Add(
            New Section(document,
                New Paragraph(document, "GemBox.Document is a .NET component that enables developers to read, write, convert and print document files (DOCX, DOC, PDF, HTML, XPS, RTF and TXT) from .NET applications in a simple and efficient way.")))

        document.ViewOptions.ViewType = ViewType.Print
        document.ViewOptions.Zoom = %Zoom%

        document.Save("View Options.docx")

    End Sub

End Module

Check next example or download examples from GitHub.