This sample shows how to specify a PDF viewer application preferences using PdfDocument.ViewerPreferences property.

A PDF viewer application preferences specify the way the document is to be displayed on the screen.

C#
using System.Diagnostics;

namespace BitMiracle.Docotic.Pdf.Samples
{
    public static class ViewerPreferences
    {
        public static void Main()
        {
            // NOTE: 
            // When used in trial mode, the library imposes some restrictions.
            // Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx
            // for more information.

            string pathToFile = "ViewerPreferences.pdf";

            using (PdfDocument pdf = new PdfDocument())
            {
                pdf.ViewerPreferences.CenterWindow = true;
                pdf.ViewerPreferences.FitWindow = true;
                pdf.ViewerPreferences.HideMenuBar = true;
                pdf.ViewerPreferences.HideToolBar = true;
                pdf.ViewerPreferences.HideWindowUI = true;

                pdf.Info.Title = "Test title";
                pdf.ViewerPreferences.DisplayTitle = true;

                pdf.Save(pathToFile);
            }

            Process.Start(pathToFile);
        }
    }
}
VB
Imports System.Diagnostics

Imports BitMiracle.Docotic.Pdf

Namespace BitMiracle.Docotic.Pdf.Samples
    Public NotInheritable Class ViewerPreferences
        Public Shared Sub Main()
            ' NOTE: 
            ' When used in trial mode, the library imposes some restrictions.
            ' Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx
            ' for more information.

            Dim pathToFile As String = "ViewerPreferences.pdf"

            Using pdf As New PdfDocument()

                pdf.ViewerPreferences.CenterWindow = True
                pdf.ViewerPreferences.FitWindow = True
                pdf.ViewerPreferences.HideMenuBar = True
                pdf.ViewerPreferences.HideToolBar = True
                pdf.ViewerPreferences.HideWindowUI = True

                pdf.Info.Title = "Test title"
                pdf.ViewerPreferences.DisplayTitle = True

                pdf.Save(pathToFile)
            End Using

            Process.Start(pathToFile)
        End Sub
    End Class
End Namespace