ViewerPreferences

Represents the viewer preferences for a document.

public class ViewerPreferences
Public Class ViewerPreferences

Inheritance: ObjectViewerPreferences

Licensing Info

This class is a DynamicPDF Core Suite Essentials 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.
Imports System
Imports ceTe.DynamicPDF
     
Module MyModule
     		
    Sub Main()
     		
        ' Create a PDF Document
        Dim MyDocument As Document = New Document
     
        ' Create a Page and add it to the document
        MyDocument.Pages.Add(New Page(PageSize.Letter))
     		
        ' Set the viewer preferences
        MyDocument.ViewerPreferences.CenterWindow = True
        MyDocument.ViewerPreferences.DisplayDocTitle = False
        MyDocument.ViewerPreferences.HideMenubar = True
        MyDocument.ViewerPreferences.HideToolbar = True
        MyDocument.ViewerPreferences.HideWindowUI = True
        MyDocument.ViewerPreferences.FitWindow = True
        MyDocument.ViewerPreferences.NoPrintScaling = True
     		
        ' Save the PDF document
        MyDocument.Draw("C:\MyDocument.pdf")
     		
    End Sub
End Module
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;
        document.ViewerPreferences.FitWindow = true;
        document.ViewerPreferences.NoPrintScaling = true;

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

Properties

CenterWindowA flag specifying whether to position the document?s window in the center of the screen.
DisplayDocTitleA flag specifying whether the window?s title bar should display the document title taken from the Title entry of the document of the PDF file containing the document.
DuplexSpecifies the default duplex printing mode for the document.
FitWindowA flag specifying whether to resize the document?s window to fit the size of the first displayed page.
HideMenubarA flag specifying whether to hide the viewer application?s menu bar when the document is active.
HideToolbarA flag specifying whether to hide the viewer application?s tool bars when the document is active.
HideWindowUIA flag specifying whether to hide user interface elements in the document?s window (such as scroll bars and navigation controls), leaving only the document?s contents displayed.
NonFullScreenPageModeSpecifies the page mode when the documents page mode is set to full screen.
NoPrintScalingA flag specifying if scaling should be used when printing the document.
NumberOfCopiesSpecifies the default number of copies to be printed.
PickTrayByPdfSizeSpecifies if the printing tray should be picked based on the size of the PDF document.
PrintAreaSpecifies the print area for the document.
PrintClipSpecifies the print clip area for the document.
PrintPageRangeSpecifies the default page ranges to be used for printing.
RightToLeftA flag specifying if right to left text is predominately used by this document.
ViewAreaSpecifies the view area for the document.
ViewClipSpecifies the view clip area for the document.

Methods

Draw(DocumentWriter)Draws the encrypter viewer preferences dictionary to the given DocumentWriter object.
Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF

In this topic