Document.ViewerPreferences Property

Gets a ViewerPreferences object that represents the viewer preferences of the Document .

public ViewerPreferences ViewerPreferences { get; }

Property Value

ViewerPreferences

Licensing Info

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to change the viewer preferences associated with a document.
using System;
using ceTe.DynamicPDF;	

public class Example 
{
    public static void CreatePDF(string outputPath)
    {
        // Create a PDF Document
        Document document = new Document();

        // Create a page and add it to the document
        document.Pages.Add(new Page(PageSize.Letter));

        // Set the viewer preferences
        document.ViewerPreferences.CenterWindow = true;
        document.ViewerPreferences.DisplayDocTitle = false;
        document.ViewerPreferences.HideMenubar = true;
        document.ViewerPreferences.HideToolbar = true;
        document.ViewerPreferences.HideWindowUI = true;

        // Save the PDF document
        document.Draw(outputPath);
    }
}

See Also

Document
ceTe.DynamicPDF