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.
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
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";
}
Products |
Support |
Feedback: PDFInitialViewOptions Class - Leadtools.Pdf |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.