cete.dynamicpdf.viewer.view
View
- Namespace: ceTe.DynamicPDF.Viewer
- Assemblies: DynamicPDF.Viewer.dll
Represents the view containing the attributes which defines the display.
public class View
Public Class View
Inheritance: Object → View
Licensing Info
This class is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
Examples
The following example will show how to get a view and its associated data.
Imports System
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer
Public Class Form1
Inherits System.Windows.Forms.Form
Private MyPdfViewer As PdfViewer
Sub New()
InitializeComponent()
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
AddHandler Me.Load, New EventHandler(AddressOf Form1_Load)
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
' Open document in viewer.
MyPdfViewer.Open("C:\MyDocument.pdf")
' Get current view on display
Dim MyCurrentView As ceTe.DynamicPDF.Viewer.View = MyPdfViewer.GetCurrentView()
' Get Initial view of the document
Dim MyInitialView As ceTe.DynamicPDF.Viewer.View = MyPdfViewer.GetInitialView()
' Get the details from a view
Dim pageNumber As Integer = MyCurrentView.StartPageNumber
Dim zoomValue As Single = MyCurrentView.ZoomPercent
Dim MyDisplayMode As PageDisplayMode = MyCurrentView.PageDisplayMode
Dim MyZoomMode As Zoom = MyCurrentView.ZoomMode
Dim pageOrientation As ceTe.DynamicPDF.Viewer.Orientation = MyCurrentView.PageOrientation
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private ceTe.DynamicPDF.Viewer.PdfViewer pdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.pdfViewer = new PdfViewer();
this.Controls.Add(pdfViewer);
this.Load+=new EventHandler(Form1_Load);
}
private void Form1_Load(object sender, EventArgs e)
{
// Open document in viewer.
pdfViewer.Open(@"C:\MyDocument.pdf");
// Get current view on display
ceTe.DynamicPDF.Viewer.View currentView = pdfViewer.GetCurrentView();
// Get Initial view of the document
ceTe.DynamicPDF.Viewer.View initialView = pdfViewer.GetInitialView();
// Get the details from a view
int pageNumber = currentView.StartPageNumber;
float zoomValue = currentView.ZoomPercent;
PageDisplayMode displayMode = currentView.PageDisplayMode;
Zoom zoomMode = currentView.ZoomMode;
ceTe.DynamicPDF.Viewer.Orientation pageOrientation = currentView.PageOrientation;
}
}
}
Properties
CurrentPageNumber
Gets the current page number of the view.
public int CurrentPageNumber { get; }
Public Property CurrentPageNumber As Int32
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
Remarks
It is a non zero based index.
CurrentScrollXPosition
Gets the current horizontal scroll position of the page.
public int CurrentScrollXPosition { get; }
Public Property CurrentScrollXPosition As Int32
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
CurrentScrollYPosition
Gets the current vertical scroll position of the page.
public int CurrentScrollYPosition { get; }
Public Property CurrentScrollYPosition As Int32
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
MaxScrollX
Gets the maximum horizontal scroll value possible based on current view.
public int MaxScrollX { get; }
Public Property MaxScrollX As Int32
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
MaxScrollY
Gets the maximum verical scroll value possible based on current view.
public int MaxScrollY { get; }
Public Property MaxScrollY As Int32
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
PageDisplayMode
Gets the page display mode of the view.
public PageDisplayMode PageDisplayMode { get; }
Public ReadOnly Property PageDisplayMode As PageDisplayMode
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
PageOrientation
Gets the page orientation of the view.
public Orientation PageOrientation { get; }
Public ReadOnly Property PageOrientation As Orientation
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
StartPageNumber
Gets the start page number of the view.
public int StartPageNumber { get; }
Public Property StartPageNumber As Int32
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
Remarks
It is a non zero based index.
ZoomMode
Gets the zoom mode of the view.
public Zoom ZoomMode { get; }
Public ReadOnly Property ZoomMode As Zoom
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
ZoomPercent
Gets the zoom percent of the view.
public float ZoomPercent { get; }
Public ReadOnly Property ZoomPercent As Single
Property Value
Licensing Info
This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
Methods
Equals(Object)
Determines whether the specified View object is equal to the current View object.
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
View object to compare with current View object.
Returns
Licensing Info
This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
Remarks
true if the specified View > object is equal to the current View object otherwise, false.
GetHashCode()
public int GetHashCode()
Function GetHashCode() As Integer
Returns
Licensing Info
This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
GetType()
Gets the Type of the current instance. (Inherited from Object)
public Type GetType()
Function GetType() As Type
Returns
The Type instance that represents the exact runtime type of the current instance.
Licensing Info
This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
ToString()
Returns a String that represents the current Object . (Inherited from Object)
public string ToString()
Function ToString() As String
Returns
A String that represents the current Object .
Licensing Info
This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.