The PDFInitialViewOptions class provides options for controlling the initial view and actions that should be applied by external viewers when the PDF file is opened.
[SerializableAttribute()]
public class PDFInitialViewOptions
<SerializableAttribute()>
Public Class PDFInitialViewOptions
[SerializableAttribute()]
public ref class PDFInitialViewOptions
Use the PDFInitialViewOptions class to specify options that control the initial view and actions that should be applied by external viewers when the PDF file is opened.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Drawing;
using Leadtools.ImageProcessing;
using Leadtools.Pdf;
using Leadtools.Svg;
using Leadtools.WinForms;
public void PDFFileInitialViewOptionsExample()
{
string sourceFileName = Path.Combine(LEAD_VARS.ImagesDir, @"Leadtools.pdf");
string destinationFileName = Path.Combine(LEAD_VARS.ImagesDir, @"LEAD_InitialView.pdf");
PDFFile pdfFile = new PDFFile(sourceFileName);
PDFInitialViewOptions myInitialViewOptions = new PDFInitialViewOptions();
myInitialViewOptions.AutoPrint = false;
myInitialViewOptions.CenterWindow = false;
myInitialViewOptions.DisplayDocTitle = true;
myInitialViewOptions.FitWindow = false;
myInitialViewOptions.HideMenubar = true;
myInitialViewOptions.HideToolbar = true;
myInitialViewOptions.HideWindowUI = true;
myInitialViewOptions.PageFitType = PDFPageFitType.FitWidth;
myInitialViewOptions.PageLayoutType = PDFPageLayoutType.OneColumnDisplay;
myInitialViewOptions.PageModeType = PDFPageModeType.PageOnly;
myInitialViewOptions.PageNumber = 2;
myInitialViewOptions.ZoomPercent = 100;
pdfFile.InitialViewOptions = myInitialViewOptions;
pdfFile.SetInitialView(destinationFileName);
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Pdf
Imports Leadtools.WinForms
Imports Leadtools.Svg
Imports Leadtools.ImageProcessing
Public Sub PDFFileInitialViewOptionsExample()
Dim sourceFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "Leadtools.pdf")
Dim destinationFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "LEAD_InitialView.pdf")
Dim pdfFile As PDFFile = New PDFFile(sourceFileName)
Dim myInitialViewOptions As PDFInitialViewOptions = New PDFInitialViewOptions()
myInitialViewOptions.AutoPrint = False
myInitialViewOptions.CenterWindow = False
myInitialViewOptions.DisplayDocTitle = True
myInitialViewOptions.FitWindow = False
myInitialViewOptions.HideMenubar = True
myInitialViewOptions.HideToolbar = True
myInitialViewOptions.HideWindowUI = True
myInitialViewOptions.PageFitType = PDFPageFitType.FitWidth
myInitialViewOptions.PageLayoutType = PDFPageLayoutType.OneColumnDisplay
myInitialViewOptions.PageModeType = PDFPageModeType.PageOnly
myInitialViewOptions.PageNumber = 2
myInitialViewOptions.ZoomPercent = 100
pdfFile.InitialViewOptions = myInitialViewOptions
pdfFile.SetInitialView(destinationFileName)
End Sub
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document