See Also

ViewerPreferences Members  | ceTe.DynamicPDF Namespace

Requirements

Namespace: ceTe.DynamicPDF

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

Language

Visual Basic

C#

Show All

Represents the viewer preferences for a document.

For a list of all members of this type, see ViewerPreferences members.

Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.ViewerPreferences

Syntax

[Visual Basic]
Public Class ViewerPreferences
[C#]
public class ViewerPreferences

Example

This example shows how to change the viewer preferences associated with a document.

[Visual Basic] 

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

[C#] 

using System; 
using ceTe.DynamicPDF; 
 
class MyClass 

    static void Main() 
    { 
        // Create a PDF Document 
        Document document = new Document(); 
         
        // Create a page and add it to the document 
        document.Pages.Add( new Page( PageSize.Letter ) ); 
         
        // 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( @"C:\MyDocument.pdf" ); 
    } 
}

Licensing

This class is a DynamicPDF Generator Community Edition feature.

Requirements

Namespace: ceTe.DynamicPDF

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

See Also

ViewerPreferences Members  | ceTe.DynamicPDF Namespace

 

 


© Copyright 2007, ceTe Software