cete.dynamicpdf.viewer.pdfviewer
PdfViewer
- Namespace: ceTe.DynamicPDF.Viewer
- Assemblies: DynamicPDF.Viewer.dll
Represents the PdfViewer control.
public class PdfViewer : Control, IBindableComponent, IComponent, IDisposable, IDropTarget, ISynchronizeInvoke, IWin32Window
Public Class PdfViewer
Inherits Control
Implements IBindableComponent, IComponent, IDisposable, IDropTarget, ISynchronizeInvoke, IWin32Window
Inheritance: Object → MarshalByRefObject → Component → Control → PdfViewer
Implements: IBindableComponent, IComponent, IDisposable, IDropTarget, ISynchronizeInvoke, IWin32Window
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
This example shows, how to load a PDF document in PdfViewer .
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
' Load and Open the document in Viewer.
Dim MyDocument As New PdfDocument("C:\MyDocument.pdf")
MyPdfViewer.Open(MyDocument)
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();
this.Load += new EventHandler(Form1_Load);
}
private void InitializeComponent()
{
this.pdfViewer = new PdfViewer();
this.Controls.Add(pdfViewer);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, EventArgs e)
{
// Load and Open the document in Viewer.
PdfDocument document = new PdfDocument(@"C:\MyDocument.pdf");
pdfViewer.Open(document);
}
}
}
Constructors
PdfViewer()
Initializes a new instance of the PdfViewer class.
public PdfViewer()
Public Sub New ()
Licensing Info
This constructor 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.
PdfViewer(IStringProvider)
Initializes a new instance of the PdfViewer class.
public PdfViewer(IStringProvider stringProvider)
Public Sub New (stringProvider As IStringProvider)
Parameters
- stringProvider: IStringProvider
Licensing Info
This constructor 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.
PdfViewer(ResourceManager)
Initializes a new instance of the PdfViewer class with resource file.
public PdfViewer(ResourceManager resource)
Public Sub New (resource As ResourceManager)
Parameters
- resource: ResourceManager
Licensing Info
This constructor 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.
Properties
AccessibilityObject
Gets the AccessibleObject assigned to the control. (Inherited from Control)
public AccessibleObject AccessibilityObject { get; }
Public Property AccessibilityObject As AccessibleObject
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.
AccessibleDefaultActionDescription
Gets or sets the default action description of the control for use by accessibility client applications. (Inherited from Control)
public string AccessibleDefaultActionDescription { get; set; }
Public Property AccessibleDefaultActionDescription As String
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.
AccessibleDescription
Gets or sets the description of the control used by accessibility client applications. (Inherited from Control)
public string AccessibleDescription { get; set; }
Public Property AccessibleDescription As String
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.
AccessibleName
Gets or sets the name of the control used by accessibility client applications. (Inherited from Control)
public string AccessibleName { get; set; }
Public Property AccessibleName As String
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.
AccessibleRole
Gets or sets the accessible role of the control (Inherited from Control)
public AccessibleRole AccessibleRole { get; set; }
Public Property AccessibleRole As AccessibleRole
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.
Exceptions
The value assigned is not one of the AccessibleRole values.
AllowDrop
Gets or sets a value indicating whether the control can accept data that the user drags onto it. (Inherited from Control)
public bool AllowDrop { get; set; }
Public Property AllowDrop As Boolean
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.
Anchor
Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent. (Inherited from Control)
public AnchorStyles Anchor { get; set; }
Public Property Anchor As AnchorStyles
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.
AutoScrollOffset
Gets or sets where this control is scrolled to in ScrollControlIntoView(System.Windows.Forms.Control) . (Inherited from Control)
public Point AutoScrollOffset { get; set; }
Public Property AutoScrollOffset As Point
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.
BackColor
Gets or sets the Back Color of the document.
public Color BackColor { get; set; }
Public Property BackColor As Color
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.
BindingContext
Gets or sets the BindingContext for the control. (Inherited from Control)
public BindingContext BindingContext { get; set; }
Public Property BindingContext As BindingContext
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.
Bottom
Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area. (Inherited from Control)
public int Bottom { get; }
Public Property Bottom 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.
Bounds
Gets or sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control. (Inherited from Control)
public Rectangle Bounds { get; set; }
Public Property Bounds As Rectangle
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.
CanFocus
Gets a value indicating whether the control can receive focus. (Inherited from Control)
public bool CanFocus { get; }
Public Property CanFocus As Boolean
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.
CanSelect
Gets a value indicating whether the control can be selected. (Inherited from Control)
public bool CanSelect { get; }
Public Property CanSelect As Boolean
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.
Capture
Gets or sets a value indicating whether the control has captured the mouse. (Inherited from Control)
public bool Capture { get; set; }
Public Property Capture As Boolean
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.
CausesValidation
Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus. (Inherited from Control)
public bool CausesValidation { get; set; }
Public Property CausesValidation As Boolean
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.
ClientRectangle
Gets the rectangle that represents the client area of the control. (Inherited from Control)
public Rectangle ClientRectangle { get; }
Public Property ClientRectangle As Rectangle
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.
ClientSize
Gets or sets the height and width of the client area of the control. (Inherited from Control)
public Size ClientSize { get; set; }
Public Property ClientSize As Size
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.
CompanyName
Gets the name of the company or creator of the application containing the control. (Inherited from Control)
public string CompanyName { get; }
Public Property CompanyName As String
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.
Container
Gets the IContainer that contains the Component . (Inherited from Component)
public IContainer Container { get; }
Public Property Container As IContainer
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.
ContainsFocus
Gets a value indicating whether the control, or one of its child controls, currently has the input focus. (Inherited from Control)
public bool ContainsFocus { get; }
Public Property ContainsFocus As Boolean
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.
Controls
Gets the collection of controls contained within the control. (Inherited from Control)
public ControlCollection Controls { get; }
Public Property Controls As ControlCollection
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.
Created
Gets a value indicating whether the control has been created. (Inherited from Control)
public bool Created { get; }
Public Property Created As Boolean
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.
CursorMode
Gets or sets the cursor mode for the document.
public CursorMode CursorMode { get; set; }
Public Property CursorMode As CursorMode
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.
DataBindings
Gets the data bindings for the control. (Inherited from Control)
public ControlBindingsCollection DataBindings { get; }
Public Property DataBindings As ControlBindingsCollection
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.
DeviceDpi
Gets the DPI value for the display device where the control is currently being displayed. (Inherited from Control)
public int DeviceDpi { get; }
Public Property DeviceDpi 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.
DisplayRectangle
Gets the rectangle that represents the display area of the control. (Inherited from Control)
public Rectangle DisplayRectangle { get; }
Public Property DisplayRectangle As Rectangle
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.
DisplayUnit
Gets or sets the display unit.
public Units DisplayUnit { get; set; }
Public Property DisplayUnit As Units
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
All the size information displayed by the control will be based on the units set on this property.For eg: Status Bar.
Disposing
Gets a value indicating whether the base Control class is in the process of disposing. (Inherited from Control)
public bool Disposing { get; }
Public Property Disposing As Boolean
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.
Dock
Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent. (Inherited from Control)
public DockStyle Dock { get; set; }
Public Property Dock As DockStyle
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.
Exceptions
The value assigned is not one of the DockStyle values.
Enabled
Gets or sets a value indicating whether the control can respond to user interaction. (Inherited from Control)
public bool Enabled { get; set; }
Public Property Enabled As Boolean
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.
FilePath
Gets the file path of the document on display.
public string FilePath { get; }
Public Property FilePath As String
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
The value will be null when the document on display is opened by passing PdfDocument to the Open method.
FocusBorderColor
Gets or sets the border color which is drawn around the document to show that the PdfViewer control has keyboard focus.
public Color FocusBorderColor { get; set; }
Public Property FocusBorderColor As Color
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.
FocusBorderWidth
Gets or sets the width (thickness) of focus rectangle border.
public int FocusBorderWidth { get; set; }
Public Property FocusBorderWidth 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
Only values between and including range 0 to 24 will be accepted. Any other value will be snapped to the nearest limit.
Focused
public bool Focused { get; }
Public Property Focused As Boolean
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.
ForeColor
public Color ForeColor { get; set; }
Public Property ForeColor As Color
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.
Handle
Gets the window handle that the control is bound to. (Inherited from Control)
public IntPtr Handle { get; }
Public Property Handle As IntPtr
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.
HasChildren
Gets a value indicating whether the control contains one or more child controls. (Inherited from Control)
public bool HasChildren { get; }
Public Property HasChildren As Boolean
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.
HasNextView
Gets a boolean value to show if next view history contains any view or not.
public bool HasNextView { get; }
Public ReadOnly Property HasNextView As Boolean
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.
HasPreviousView
Gets a boolean value to show if previous view history contains any view or not.
public bool HasPreviousView { get; }
Public ReadOnly Property HasPreviousView As Boolean
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.
Height
Gets or sets the height of the control. (Inherited from Control)
public int Height { get; set; }
Public Property Height 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.
ImeMode
Gets or sets the Input Method Editor (IME) mode of the control. (Inherited from Control)
public ImeMode ImeMode { get; set; }
Public Property ImeMode As ImeMode
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.
Exceptions
The assigned value is not one of the ImeMode enumeration values.
InitialOrientation
Gets or sets the value of page orientation when displaying a document.
public Nullable<Orientation> InitialOrientation { get; set; }
Public Property InitialOrientation As Nullable(Of 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.
InitialPage
Gets or sets the value of initial page when displaying a document.
public Nullable<int> InitialPage { get; set; }
Public Property InitialPage As Nullable(Of Integer)
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
The value should be a positive number and it will be 0 by default in case if it exceeds the total number of pages or not set.
InitialPageMode
Gets or sets the value of page mode when displaying a document.
public Nullable<PageDisplayMode> InitialPageMode { get; set; }
Public Property InitialPageMode As Nullable(Of 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.
InitialVisibleNavigationPane
Gets or sets the value of navigation pane to be visible when displaying a document.
public Nullable<NavigationPane> InitialVisibleNavigationPane { get; set; }
Public Property InitialVisibleNavigationPane As Nullable(Of NavigationPane)
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.
InitialZoomMode
Gets or sets the value of page zoom mode when displaying a document.
public Nullable<Zoom> InitialZoomMode { get; set; }
Public Property InitialZoomMode As Nullable(Of 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.
Remarks
If zoom percent mode is selected then the value of InitialZoomPercent has to be specified. Otherwise it will be .01f by default.
InitialZoomPercent
Gets or sets the value of page zoom percent when displaying a document.
public Nullable<float> InitialZoomPercent { get; set; }
Public Property InitialZoomPercent As Nullable(Of 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.
Remarks
This value ranges from .01f to 64.0f.
InvokeRequired
Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on. (Inherited from Control)
public bool InvokeRequired { get; }
Public Property InvokeRequired As Boolean
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.
IsAccessible
Gets or sets a value indicating whether the control is visible to accessibility applications. (Inherited from Control)
public bool IsAccessible { get; set; }
Public Property IsAccessible As Boolean
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.
IsDisposed
Gets a value indicating whether the control has been disposed of. (Inherited from Control)
public bool IsDisposed { get; }
Public Property IsDisposed As Boolean
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.
IsHandleCreated
Gets a value indicating whether the control has a handle associated with it. (Inherited from Control)
public bool IsHandleCreated { get; }
Public Property IsHandleCreated As Boolean
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.
IsMirrored
Gets a value indicating whether the control is mirrored. (Inherited from Control)
public bool IsMirrored { get; }
Public Property IsMirrored As Boolean
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.
LayoutEngine
Gets a cached instance of the control's layout engine. (Inherited from Control)
public LayoutEngine LayoutEngine { get; }
Public Property LayoutEngine As LayoutEngine
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.
Left
Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area. (Inherited from Control)
public int Left { get; set; }
Public Property Left 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.
Location
Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container. (Inherited from Control)
public Point Location { get; set; }
Public Property Location As Point
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.
Margin
Gets or sets the space between controls. (Inherited from Control)
public Padding Margin { get; set; }
Public Property Margin As Padding
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.
MaximumSize
Gets or sets the size that is the upper limit that GetPreferredSize(System.Drawing.Size) can specify. (Inherited from Control)
public Size MaximumSize { get; set; }
Public Property MaximumSize As Size
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.
MinimumSize
Gets or sets the size that is the lower limit that GetPreferredSize(System.Drawing.Size) can specify. (Inherited from Control)
public Size MinimumSize { get; set; }
Public Property MinimumSize As Size
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.
Name
Gets or sets the name of the control. (Inherited from Control)
public string Name { get; set; }
Public Property Name As String
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.
NavigationPanelWidth
Gets or sets the PdfNavigationPanel width.
public int NavigationPanelWidth { get; set; }
Public Property NavigationPanelWidth 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.
Padding
Gets or sets padding within the control. (Inherited from Control)
public Padding Padding { get; set; }
Public Property Padding As Padding
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.
PageColor
Gets or sets the Page Color of the document.
public Color PageColor { get; set; }
Public Property PageColor As Color
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.
PageMode
Gets or sets the Page Display mode of the document.
public PageDisplayMode PageMode { get; set; }
Public Property PageMode 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 or sets the Orientation of the page.
public Orientation PageOrientation { get; set; }
Public 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.
Parent
Gets or sets the parent container of the control. (Inherited from Control)
public Control Parent { get; set; }
Public Property Parent As Control
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.
PreferredSize
Gets the size of a rectangular area into which the control can fit. (Inherited from Control)
public Size PreferredSize { get; }
Public Property PreferredSize As Size
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.
ProductName
Gets the product name of the assembly containing the control. (Inherited from Control)
public string ProductName { get; }
Public Property ProductName As String
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.
ProductVersion
Gets the version of the assembly containing the control. (Inherited from Control)
public string ProductVersion { get; }
Public Property ProductVersion As String
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.
RecreatingHandle
Gets a value indicating whether the control is currently re-creating its handle. (Inherited from Control)
public bool RecreatingHandle { get; }
Public Property RecreatingHandle As Boolean
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.
Region
Gets or sets the window region associated with the control. (Inherited from Control)
public Region Region { get; set; }
Public Property Region As Region
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.
Right
Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area. (Inherited from Control)
public int Right { get; }
Public Property Right 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.
RightToLeft
public RightToLeft RightToLeft { get; set; }
Public Property RightToLeft As RightToLeft
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.
RightToLeftText
Gets or sets the RightToLeftText of the viewer control.
public Nullable<bool> RightToLeftText { get; set; }
Public Property RightToLeftText As Nullable(Of Boolean)
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.
ShowBookmarkIcon
Gets or sets the value to show/hide the bookmarks icon in navigation panel.
public bool ShowBookmarkIcon { get; set; }
Public Property ShowBookmarkIcon As Boolean
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
True value will show the bookmark icon in the navigation panel.
ShowHorizontalScrollbar
Gets or sets the boolean to show/hide the horizontal Scroll Bar.
public bool ShowHorizontalScrollbar { get; set; }
Public Property ShowHorizontalScrollbar As Boolean
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
True value will show the horizontal Scroll Bar.
ShowNavigationPanel
Gets or sets the boolean to show/hide the navigation panel.
public bool ShowNavigationPanel { get; set; }
Public Property ShowNavigationPanel As Boolean
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
True value will show the navigation panel.
ShowStatusBar
Hides or unhides the status bar.
public bool ShowStatusBar { get; set; }
Public Property ShowStatusBar As Boolean
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.
ShowThumbnailIcon
Gets or sets the value to show/hide thumbnails icon in navigation panel.
public bool ShowThumbnailIcon { get; set; }
Public Property ShowThumbnailIcon As Boolean
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
True value will show the thumbnail icon in the navigation panel.
ShowToolStrip
Gets or sets the boolean to show/hide the PdfToolStrip.
public bool ShowToolStrip { get; set; }
Public Property ShowToolStrip As Boolean
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
True value will show the default PdfToolStrip.
ShowVerticalScrollbar
Gets or sets the boolean to show/hide the vertical Scroll Bar.
public bool ShowVerticalScrollbar { get; set; }
Public Property ShowVerticalScrollbar As Boolean
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
True value will show the vertical Scroll Bar.
Site
Gets or sets the site of the control. (Inherited from Control)
public ISite Site { get; set; }
Public Property Site As ISite
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.
Size
Gets or sets the height and width of the control. (Inherited from Control)
public Size Size { get; set; }
Public Property Size As Size
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.
TabIndex
Gets or sets the tab order of the control within its container. (Inherited from Control)
public int TabIndex { get; set; }
Public Property TabIndex 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.
TabStop
Gets or sets a value indicating whether the user can give the focus to this control using the TAB key. (Inherited from Control)
public bool TabStop { get; set; }
Public Property TabStop As Boolean
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.
Tag
Gets or sets the object that contains data about the control. (Inherited from Control)
public Object Tag { get; set; }
Public Property Tag As Object
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.
TextSelectionColor
Gets or sets the Text selection Color of the document.
public Color TextSelectionColor { get; set; }
Public Property TextSelectionColor As Color
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.
ToolStrip
Gets or sets the PdfToolStrip of the viewer control.
public ToolStrip ToolStrip { get; set; }
Public Property ToolStrip As ToolStrip
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.
Top
Gets or sets the distance, in pixels, between the top edge of the control and the top edge of its container's client area. (Inherited from Control)
public int Top { get; set; }
Public Property Top 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.
TopLevelControl
Gets the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in. (Inherited from Control)
public Control TopLevelControl { get; }
Public Property TopLevelControl As Control
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.
UseWaitCursor
Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls. (Inherited from Control)
public bool UseWaitCursor { get; set; }
Public Property UseWaitCursor As Boolean
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.
Visible
Gets or sets a value indicating whether the control and all its child controls are displayed. (Inherited from Control)
public bool Visible { get; set; }
Public Property Visible As Boolean
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.
VisibleNavigationPane
Gets or sets the value of navigation pane to be visible for displayed document.
public NavigationPane VisibleNavigationPane { get; set; }
Public Property VisibleNavigationPane As NavigationPane
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.
Width
Gets or sets the width of the control. (Inherited from Control)
public int Width { get; set; }
Public Property Width 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.
ZoomMode
Gets or sets the Zoom Mode of the document.
public Zoom ZoomMode { get; set; }
Public 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 or sets the value of page zoom percent for displayed document.
public float ZoomPercent { get; set; }
Public 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.
Remarks
This value ranges from .01f to 64.0f.
Methods
AddLicense(String)
Adds a license key.
public static bool AddLicense(string licenseKey)
Shared Function AddLicense(licenseKey As String) As Boolean
Parameters
- licenseKey: String
The license key to add.
Returns
A boolean value indicating if the license key is valid.
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
This method accepts a license key, not a serial number.
BeginInvoke(Delegate)
Executes the specified delegate asynchronously on the thread that the control's underlying handle was created on. (Inherited from Control)
public IAsyncResult BeginInvoke(Delegate method)
Function BeginInvoke(method As Delegate) As IAsyncResult
Parameters
- method: Delegate
A delegate to a method that takes no parameters.
Returns
An IAsyncResult that represents the result of the BeginInvoke(System.Delegate) operation.
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.
Exceptions
No appropriate window handle can be found.
BeginInvoke(Delegate, Object[])
Executes the specified delegate asynchronously with the specified arguments, on the thread that the control's underlying handle was created on. (Inherited from Control)
public IAsyncResult BeginInvoke(Delegate method, Object[] args)
Function BeginInvoke(method As Delegate, args As Object[]) As IAsyncResult
Parameters
- method: Delegate
A delegate to a method that takes parameters of the same number and type that are contained in the parameter.
- args: Object[]
An array of objects to pass as arguments to the given method. This can be if no arguments are needed.
Returns
An IAsyncResult that represents the result of the BeginInvoke(System.Delegate) operation.
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.
Exceptions
No appropriate window handle can be found.
BringToFront()
Brings the control to the front of the z-order. (Inherited from Control)
public void BringToFront()
Sub BringToFront()
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.
ClearSearchHighlights()
Clear all the highlights in the document.
public void ClearSearchHighlights()
Sub ClearSearchHighlights()
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.
Examples
The following example will show how to clear all the highlights from the document.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub ClearHighlights()
' Open document in viewer.
MyPdfViewer.Open("C:\MyDocument.pdf")
' Clear all the highlights.
MyPdfViewer.ClearSearchHighlights()
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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void ClearHighlights()
{
// Open document in viewer.
Open(@"C:\MyDocument.pdf");
// Clear all the highlights.
ClearSearchHighlights();
}
}
}
ClearViewHistory()
Clears all the View present in the history.
public void ClearViewHistory()
Sub ClearViewHistory()
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.
Examples
The following example will show how to clear all the views present in the history.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub ClearViewerViewHistory() ' Clear all the views. MyPdfViewer.ClearViewHistory()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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void ClearViewerViewHistory()
{
// Clear all the views.
ClearViewHistory();
}
}
}
Close()
Closes the opened PDF.
public void Close()
Sub Close()
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.
Examples
This example shows, how to load a PDF document in PdfViewer and close it.
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
Private Sub InitializeComponent()
Dim MyCloseButton As New Button()
MyCloseButton.Text = "CloseButton"
Me.Controls.Add(MyCloseButton)
AddHandler MyCloseButton.Click, New EventHandler(AddressOf MyCloseButton_Click)
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
AddHandler Me.Load, New EventHandler(AddressOf Form1_Load)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
' Open the document in Viewer.
MyPdfViewer.Open("C:\MyDocument.pdf")
End Sub
Private Sub MyCloseButton_Click(ByVal sender As Object, ByVal e As EventArgs)
MyPdfViewer.Close()
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
Button CloseButton = new Button();
CloseButton.Text = "CloseButton";
this.Controls.Add(CloseButton);
CloseButton.Click+= new EventHandler(CloseButton_Click);
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
this.Load +=new EventHandler(Form1_Load);
}
private void Form1_Load(object sender, EventArgs e)
{
Open(@"C:\MyDocument.pdf");
}
private void CloseButton_Click(object sender, EventArgs e)
{
Close();
}
}
}
Contains(Control)
Retrieves a value indicating whether the specified control is a child of the control. (Inherited from Control)
public bool Contains(Control ctl)
Function Contains(ctl As Control) As Boolean
Parameters
- ctl: Control
The Control to evaluate.
Returns
if the specified control is a child of the control; otherwise, .
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.
CreateControl()
Forces the creation of the visible control, including the creation of the handle and any visible child controls. (Inherited from Control)
public void CreateControl()
Sub CreateControl()
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.
CreateGraphics()
Creates the Graphics for the control. (Inherited from Control)
public Graphics CreateGraphics()
Function CreateGraphics() As Graphics
Returns
The Graphics for the control.
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.
CreateObjRef(Type)
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject)
public ObjRef CreateObjRef(Type requestedType)
Function CreateObjRef(requestedType As Type) As ObjRef
Parameters
- requestedType: Type
The Type of the object that the new ObjRef will reference.
Returns
Information required to generate a proxy.
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.
Exceptions
This instance is not a valid remoting object.
The immediate caller does not have infrastructure permission.
CreateThumbnail(Int32, Size)
Create a thumbnail for the page number specified as parameter and returns a Bitmap of size best fit within provided size parameter.
public Bitmap CreateThumbnail(int pageNumber, Size bitmapSize)
Function CreateThumbnail(pageNumber As Integer, bitmapSize As Size) As Bitmap
Parameters
- pageNumber: Int32
Page number of the required thumbnail.
- bitmapSize: Size
Thumbnail will be created to best fit within this given size.
Returns
A Bitmap containing thumbnail of the specified page number with a size best fit to the size provided as parameter.
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.
Examples
The following example will show how to move to a page by specifying its number.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub CreateThumbnail() Dim thumb As System.Drawing.Bitmap ' Open document in viewer. MyPdfViewer.Open("C:\MyDocument.pdf")
' Create a Thumbnail. ' PageNumber ranges from '1' to 'count' of the pages in the document. ' Size of thumb will be such that the longer edge will be 200 pixcels. thumb = MyPdfViewer.CreateThumbnail(1, New new Size(200, 200)) thumb.Save("C:\MyThumb.png")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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigateToPagenumber()
{
// Open document in viewer.
Open(@"C:\MyDocument.pdf");
// Create a Thumbnail // PageNumber ranges from '1' to 'count' of the pages in the document. // Size of thumb will be such that the longer edge will be 200 pixcels.
System.Drawing.Bitmap thumb = CreateThumbnail(1, new new Size(200, 200));
thumb.Save(@"C:\MyThumb.png");
}
}
}
Remarks
The page number should be a non zero based index. The size may not be same as provided as parameter but it will fit within the box of the provided size.
Dispose()
Releases all resources used by the Component . (Inherited from Component)
public void Dispose()
Sub Dispose()
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.
DoDragDrop(Object, DragDropEffects)
Begins a drag-and-drop operation. (Inherited from Control)
public DragDropEffects DoDragDrop(Object data, DragDropEffects allowedEffects)
Function DoDragDrop(data As Object, allowedEffects As DragDropEffects) As DragDropEffects
Parameters
- data: Object
The data to drag.
- allowedEffects: DragDropEffects
One of the DragDropEffects values.
Returns
A value from the DragDropEffects enumeration that represents the final effect that was performed during the drag-and-drop operation.
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.
DrawToBitmap(Bitmap, Rectangle)
Supports rendering to the specified bitmap. (Inherited from Control)
public void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
Sub DrawToBitmap(bitmap As Bitmap, targetBounds As Rectangle)
Parameters
- bitmap: Bitmap
The bitmap to be drawn to.
- targetBounds: Rectangle
The bounds within which the control is rendered.
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.
EndInvoke(IAsyncResult)
Retrieves the return value of the asynchronous operation represented by the IAsyncResult passed. (Inherited from Control)
public Object EndInvoke(IAsyncResult asyncResult)
Function EndInvoke(asyncResult As IAsyncResult) As Object
Parameters
- asyncResult: IAsyncResult
The IAsyncResult that represents a specific invoke asynchronous operation, returned when calling BeginInvoke(System.Delegate) .
Returns
The Object generated by the asynchronous operation.
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.
Exceptions
The parameter value is .
The object was not created by a preceding call of the BeginInvoke(System.Delegate) method from the same control.
Equals(Object)
Determines whether the specified Object is equal to the current Object . (Inherited from Object)
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
The Object to compare with the current Object .
Returns
true if the specified Object is equal to the current Object ; otherwise, false.
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.
FindForm()
Retrieves the form that the control is on. (Inherited from Control)
public Form FindForm()
Function FindForm() As Form
Returns
The Form that the control is on.
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.
Focus()
Sets input focus to the control. (Inherited from Control)
public bool Focus()
Function Focus() As Boolean
Returns
if the input focus request was successful; otherwise, .
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.
GetChildAtPoint(Point)
Retrieves the child control that is located at the specified coordinates. (Inherited from Control)
public Control GetChildAtPoint(Point pt)
Function GetChildAtPoint(pt As Point) As Control
Parameters
- pt: Point
A Point that contains the coordinates where you want to look for a control. Coordinates are expressed relative to the upper-left corner of the control's client area.
Returns
A Control that represents the control that is located at the specified point.
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.
GetChildAtPoint(Point, GetChildAtPointSkip)
Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type. (Inherited from Control)
public Control GetChildAtPoint(Point pt, GetChildAtPointSkip skipValue)
Function GetChildAtPoint(pt As Point, skipValue As GetChildAtPointSkip) As Control
Parameters
- pt: Point
A Point that contains the coordinates where you want to look for a control. Coordinates are expressed relative to the upper-left corner of the control's client area.
- skipValue: GetChildAtPointSkip
One of the values of GetChildAtPointSkip , determining whether to ignore child controls of a certain type.
Returns
The child Control at the specified coordinates.
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.
GetContainerControl()
Returns the next ContainerControl up the control's chain of parent controls. (Inherited from Control)
public IContainerControl GetContainerControl()
Function GetContainerControl() As IContainerControl
Returns
An IContainerControl , that represents the parent of the Control .
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.
GetCurrentView()
Retrieves the current View of the document displayed.
public View GetCurrentView()
Function GetCurrentView() As View
Returns
This method returns the current View of the document on display.
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.
Examples
The following example will show how to get current 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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
AddHandler Me.Load, New EventHandler(AddressOf Form1_Load)
End Sub
Shared Sub Main()
Application.Run(New Form1())
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 the details of view.
Dim pageNo As Integer = MyCurrentView.StartPageNumber
Dim zoomValue As Single = MyCurrentView.ZoomPercent
Dim MyDisplayMode As PageDisplayMode = MyCurrentView.PageDisplayMode
Dim MySoomMode As Zoom = MyCurrentView.ZoomMode
Dim MyPageOrientation As 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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
this.Load +=new EventHandler(Form1_Load);
}
private void Form1_Load(object sender, EventArgs e)
{
// Open document in viewer.
Open(@"C:\MyDocument.pdf");
// Get current view on display.
ceTe.DynamicPDF.Viewer.View currentView = GetCurrentView();
// Get the details of view.
int pageNo = currentView.StartPageNumber;
float zoomValue = currentView.ZoomPercent;
PageDisplayMode displayMode = currentView.PageDisplayMode;
Zoom zoomMode = currentView.ZoomMode;
Orientation pageOrientation = currentView.PageOrientation;
}
}
}
GetHashCode()
Serves as a hash function for a particular type. (Inherited from Object)
public int GetHashCode()
Function GetHashCode() As Integer
Returns
A hash code for 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.
GetInitialView()
Retrieves the initial View of the document displayed.
public View GetInitialView()
Function GetInitialView() As View
Returns
This method returns the initial View of the document on display.
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.
Examples
The following example will show how to get the initial view and its associated details.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
AddHandler Me.Load, New EventHandler(AddressOf Form1_Load)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
' Open the document in Viewer.
MyPdfViewer.Open("C:\MyDocument.pdf")
'Get initial view of the document.
Dim MyInitialView As ceTe.DynamicPDF.Viewer.View = MyPdfViewer.GetInitialView()
' Get the details of view.
Dim pageNo As Integer = MyInitialView.StartPageNumber
Dim zoomValue As Single = MyInitialView.ZoomPercent
Dim MyDisplayMode As PageDisplayMode = MyInitialView.PageDisplayMode
Dim MyZoomMode As Zoom = MyInitialView.ZoomMode
Dim MyPageOrientation As Orientation = MyInitialView.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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
this.Load+=new EventHandler(Form1_Load);
}
private void Form1_Load(object sender, EventArgs e)
{
// Open document in PdfViewwer.
Open(@"C:\MyDocument.pdf");
//Get initial view of the document.
ceTe.DynamicPDF.Viewer.View initialView = GetInitialView();
// Get the details of view.
int pageNo = initialView.StartPageNumber;
float zoomValue = initialView.ZoomPercent;
PageDisplayMode displayMode = initialView.PageDisplayMode;
Zoom zoomMode = initialView.ZoomMode;
Orientation pageOrientation = initialView.PageOrientation;
}
}
}
GetLifetimeService()
Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject)
public Object GetLifetimeService()
Function GetLifetimeService() As Object
Returns
An object of type ILease used to control the lifetime policy for this 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.
Exceptions
The immediate caller does not have infrastructure permission.
GetNextControl(Control, Boolean)
Retrieves the next control forward or back in the tab order of child controls. (Inherited from Control)
public Control GetNextControl(Control ctl, bool forward)
Function GetNextControl(ctl As Control, forward As Boolean) As Control
Parameters
- ctl: Control
The Control to start the search with.
- forward: Boolean
to search forward in the tab order; to search backward.
Returns
The next Control in the tab order.
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.
GetPageVisibleArea(View)
Retrieves an array of pages present in View specified with respective visible area.
public PageVisibleArea[] GetPageVisibleArea(View view)
Function GetPageVisibleArea(view As View) As PageVisibleArea[]
Parameters
- view: View
The View whose visible area is required.
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.
Examples
For example refer PageVisibleArea class.
GetPreferredSize(Size)
Retrieves the size of a rectangular area into which a control can be fitted. (Inherited from Control)
public Size GetPreferredSize(Size proposedSize)
Function GetPreferredSize(proposedSize As Size) As Size
Parameters
- proposedSize: Size
The custom-sized area for a control.
Returns
An ordered pair of type Size representing the width and height of a rectangle.
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.
GoTo(Int32)
Moves to the page specified as parameter.
public void GoTo(int pageNum)
Sub GoTo(pageNum As Integer)
Parameters
- pageNum: Int32
The page number to move to.
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.
Examples
The following example will show how to move to a page by specifying its number.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub NavigateToPagenumber() ' Open document in viewer. MyPdfViewer.Open("C:\MyDocument.pdf")
' Move to a page. ' PageNumber ranges from '1' to 'count' of the pages in the document. MyPdfViewer.GoTo(1)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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigateToPagenumber()
{
// Open document in viewer.
Open(@"C:\MyDocument.pdf");
// Move to a page. // PageNumber ranges from '1' to 'count' of the pages in the document.
GoTo(1);
}
}
}
Remarks
The page number should be a non zero based index.
GoToFirstPage()
Moves to the first page of the document.
public void GoToFirstPage()
Sub GoToFirstPage()
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.
Examples
The following example will show how to move to first page of the document.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub NavigateToPage() ' Open document in Viewer. MyPdfViewer.Open("C:\MyDocument.pdf")
' Move to first page. MyPdfViewer.GoToFirstPage()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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigateToPage()
{
// Open document in Viewer.
Open(@"C:\MyDocument.pdf");
// Move to first page.
GoToFirstPage();
}
}
}
GoToLastPage()
Moves to the last page of the document.
public void GoToLastPage()
Sub GoToLastPage()
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.
Examples
The following example will show how to move to last page of the document.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub NavigateToPage() ' Open document in viewer. MyPdfViewer.Open("C:\MyDocument.pdf")
' Move to last page. MyPdfViewer.GoToLastPage()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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigateToPage()
{
// Open document in viewer.
Open(@"C:\MyDocument.pdf");
// Move to last page.
GoToLastPage();
}
}
}
GoToNextPage()
Moves to next page.
public bool GoToNextPage()
Function GoToNextPage() As Boolean
Returns
True if successfully moved to next page else false.
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.
Examples
The following example will show how to move to next page.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub NavigateToPage() ' Move to next page. Dim bResult As Boolean = MyPdfViewer.GoToNextPage()
If bResult Then MessageBox.Show("Successfully moved to next page") Else MessageBox.Show("There's no next page to move") End IfEnd Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private ceTe.DynamicPDF.Viewer.PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigateToPage()
{
// Move to next page.
bool bResult = GoToNextPage();
if(bResult)
MessageBox.Show("Successfully moved to next page");
else
MessageBox.Show("There's no next page to move");
}
}
}
GoToPreviousPage()
Moves to the previous page.
public bool GoToPreviousPage()
Function GoToPreviousPage() As Boolean
Returns
True if successfully moved to previous page else false.
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.
Examples
The following example will show how to move to previous page.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub NavigateToPage() ' Move to previous page. Dim bResult As Boolean = MyPdfViewer.GoToPreviousPage()
If bResult Then MessageBox.Show("Successfully moved to previous page") Else MessageBox.Show("There's no previous page to move") End IfEnd Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private ceTe.DynamicPDF.Viewer.PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigateToPage()
{
// Move to previous page.
bool bResult = GoToPreviousPage();
if(bResult)
MessageBox.Show("Successfully moved to previous page");
else
MessageBox.Show("There's no previous page to move");
}
}
}
Hide()
Conceals the control from the user. (Inherited from Control)
public void Hide()
Sub Hide()
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.
Highlight(String, MatchOptions)
Highlights the specified string throughout the document.
public void Highlight(string searchTerm, MatchOptions option)
Sub Highlight(searchTerm As String, option As MatchOptions)
Parameters
- searchTerm: String
The string to be highlighted.
- option: MatchOptions
The match option to be used to search and highlight the string.
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.
Examples
The following example will show how to highlight a string throughout the document with a match option.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub Highlight()
' Highlights a string throughout the document.
MyPdfViewer.Highlight("string", MatchOptions.WholeWordOnly)
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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void Highlight()
{
// Highlights a string throughout the document.
Highlight("string" , MatchOptions.WholeWordOnly);
}
}
}
Highlight(String, MatchOptions, Color)
Highlights the specified string throughout the document with the specified color.
public void Highlight(string searchTerm, MatchOptions option, Color TextHighlightColor)
Sub Highlight(searchTerm As String, option As MatchOptions, TextHighlightColor As Color)
Parameters
- searchTerm: String
The string to be highlighted.
- option: MatchOptions
The match option to be used to search and highlight the string.
- TextHighlightColor: Color
The search item highlight color.
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.
Examples
The following example will show how to highlight a string throughout the document with a match option and specified color.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub Highlight()
' Assign the color to which the text needs to be highlighted. Color highlightColor = (Color.FromArgb(90, 110, 0, 255));
' Highlights a string throughout the document.
MyPdfViewer.Highlight("string", MatchOptions.WholeWordOnly)
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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void Highlight()
{ // Assign the color to which the text needs to be highlighted. Color highlightColor = (Color.FromArgb(90, 110, 0, 255));
// Highlights a string throughout the document.
Highlight("string" , MatchOptions.WholeWordOnly,highlightColor);
}
}
}
InitializeLifetimeService()
Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject)
public Object InitializeLifetimeService()
Function InitializeLifetimeService() As Object
Returns
An object of type ILease used to control the lifetime policy for this instance. This is the current lifetime service object for this instance if one exists; otherwise, a new lifetime service object initialized to the value of the LeaseManagerPollTime property.
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.
Exceptions
The immediate caller does not have infrastructure permission.
Invalidate()
Invalidates the entire surface of the control and causes the control to be redrawn. (Inherited from Control)
public void Invalidate()
Sub Invalidate()
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.
Invalidate(Boolean)
Invalidates a specific region of the control and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control. (Inherited from Control)
public void Invalidate(bool invalidateChildren)
Sub Invalidate(invalidateChildren As Boolean)
Parameters
- invalidateChildren: Boolean
to invalidate the control's child controls; otherwise, .
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.
Invalidate(Rectangle)
Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. (Inherited from Control)
public void Invalidate(Rectangle rc)
Sub Invalidate(rc As Rectangle)
Parameters
- rc: Rectangle
A Rectangle that represents the region to invalidate.
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.
Invalidate(Rectangle, Boolean)
Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control. (Inherited from Control)
public void Invalidate(Rectangle rc, bool invalidateChildren)
Sub Invalidate(rc As Rectangle, invalidateChildren As Boolean)
Parameters
- rc: Rectangle
A Rectangle that represents the region to invalidate.
- invalidateChildren: Boolean
to invalidate the control's child controls; otherwise, .
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.
Invalidate(Region)
Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. (Inherited from Control)
public void Invalidate(Region region)
Sub Invalidate(region As Region)
Parameters
- region: Region
The Region to invalidate.
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.
Invalidate(Region, Boolean)
Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control. (Inherited from Control)
public void Invalidate(Region region, bool invalidateChildren)
Sub Invalidate(region As Region, invalidateChildren As Boolean)
Parameters
- region: Region
The Region to invalidate.
- invalidateChildren: Boolean
to invalidate the control's child controls; otherwise, .
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.
Invoke(Delegate)
Executes the specified delegate on the thread that owns the control's underlying window handle. (Inherited from Control)
public Object Invoke(Delegate method)
Function Invoke(method As Delegate) As Object
Parameters
- method: Delegate
A delegate that contains a method to be called in the control's thread context.
Returns
The return value from the delegate being invoked, or if the delegate has no return value.
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.
Invoke(Delegate, Object[])
Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments. (Inherited from Control)
public Object Invoke(Delegate method, Object[] args)
Function Invoke(method As Delegate, args As Object[]) As Object
Parameters
- method: Delegate
A delegate to a method that takes parameters of the same number and type that are contained in the parameter.
- args: Object[]
An array of objects to pass as arguments to the specified method. This parameter can be if the method takes no arguments.
Returns
An Object that contains the return value from the delegate being invoked, or if the delegate has no return value.
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.
LogicalToDeviceUnits(Int32)
Converts a Logical DPI value to its equivalent DeviceUnit DPI value. (Inherited from Control)
public int LogicalToDeviceUnits(int value)
Function LogicalToDeviceUnits(value As Integer) As Integer
Parameters
- value: Int32
The Logical value to convert.
Returns
The resulting DeviceUnit value.
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.
LogicalToDeviceUnits(Size)
Transforms a size from logical to device units by scaling it for the current DPI and rounding down to the nearest integer value for width and height. (Inherited from Control)
public Size LogicalToDeviceUnits(Size value)
Function LogicalToDeviceUnits(value As Size) As Size
Parameters
- value: Size
The size to be scaled.
Returns
The scaled size.
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.
Navigate(Action)
Navigate to the destination stored in the Action object of the link.
public void Navigate(Action action)
Sub Navigate(action As Action)
Parameters
- action: Action
The Action object containing the information about the link.
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.
Examples
The following example will show how to get a Action object and navigate to it.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
AddHandler MyPdfViewer.LinkClicked, AddressOf MyPdfViewer_LinkClicked
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub MyPdfViewer_LinkClicked(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.LinkClickedEventArgs)
' Get the action associated with the link.
Dim Myction As ceTe.DynamicPDF.Viewer.Action = e.Action
' Navigate to the action.
Me.MyPdfViewer.Navigate(Myction)
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
LinkClicked += new ceTe.DynamicPDF.Viewer.LinkClickEventHandler(this.pdfViewer_LinkClicked);
}
private void pdfViewer_LinkClicked(object sender, ceTe.DynamicPDF.Viewer.LinkClickedEventArgs e)
{
// Get the action associated with the link.
ceTe.DynamicPDF.Viewer.Action action = e.Action;
// Navigate to the action.
this.Navigate(action);
}
}
}
Remarks
In case of remote goto user needs to open the file first and then navigate to the action.
Navigate(Bookmark)
Navigate to the Bookmark specified.
public void Navigate(Bookmark bookmark)
Sub Navigate(bookmark As Bookmark)
Parameters
- bookmark: Bookmark
The Bookmark to move to.
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.
Examples
The following example will show how to get a Bookmark and navigate to it.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub NavigationToBookmark() ' Get a PDF document object and open in viewer. Dim document As New PdfDocument("C:\MyDocument.pdf") MyPdfViewer.Open(document)
' Get a bookmark from PDF document object. Dim bookmarkList As BookmarkList = document.Bookmarks
' Get a bookmark from the list. ' Index ranges from 0 to n(count-1) of the bookmarks Dim bookmark As Bookmark = bookmarkList(0)
' Navigate to a bookmark passed as parameter. MyPdfViewer.Navigate(bookmark)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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigationToBookmark()
{
// Get a PDF document object and open in viewer.
PdfDocument document = new PdfDocument(@"C:\MyDocument.pdf");
Open(document);
// Get a bookmark from PDF document object.
BookmarkList bookmarkList = document.Bookmarks;
// Get a bookmark from the list.
// Index ranges from 0 to n(count-1) of the bookmarks
Bookmark bookmark = bookmarkList[0];
// Navigate to a bookmark passed as parameter.
Navigate(bookmark);
}
}
}
Navigate(View)
Navigates to the View specified.
public void Navigate(View view)
Sub Navigate(view As View)
Parameters
- view: View
The View to move to.
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.
Examples
The following example will show how to navigate to a view given as parameter.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub NavigationToView() ' Get initial view. Dim initView As ceTe.DynamicPDF.Viewer.View = MyPdfViewer.GetInitialView()
' Navigate to view passed as parameter. MyPdfViewer.Navigate(initView)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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigationToView()
{
// Get initial view.
ceTe.DynamicPDF.Viewer.View initView = GetInitialView();
// Navigate to view passed as parameter.
Navigate(initView);
}
}
}
Navigate(View, Int32, Int32)
Navigates to the View specified.
public void Navigate(View view, int offsetX, int offsetY)
Sub Navigate(view As View, offsetX As Integer, offsetY As Integer)
Parameters
- view: View
The View to move to.
- offsetX: Int32
The view position will be moved left or right based on this value.
- offsetY: Int32
The view position will be moved up or down based on this value.
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.
NavigateToNextView()
Navigates to the View in next history.
public bool NavigateToNextView()
Function NavigateToNextView() As Boolean
Returns
True if successfully moved to next view else false.
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.
Examples
The following example will show how to Navigate to the next view.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub NavigationToView() ' Navigate to next view. Dim bResult As Boolean = MyPdfViewer.NavigateToNextView()
If bResult Then MessageBox.Show("Successfully moved to next view") Else MessageBox.Show("There's no next view to navigate") End IfEnd Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private ceTe.DynamicPDF.Viewer.PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigationToView()
{
// Navigate to next view.
bool bResult = NavigateToNextView();
if(bResult)
MessageBox.Show("Successfully moved to next view");
else
MessageBox.Show("There's no next view to navigate");
}
}
}
NavigateToPreviousView()
Navigates to the View in previous history.
public bool NavigateToPreviousView()
Function NavigateToPreviousView() As Boolean
Returns
True if successfully moved to previous view else false.
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.
Examples
The following example will show how to Navigate to the previous view.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub NavigationToView() ' Navigate to previous view. Dim bResult As Boolean = MyPdfViewer.NavigateToPreviousView()
If bResult Then MessageBox.Show("Successfully moved to previous view") Else MessageBox.Show("There's no previous view to navigate") End IfEnd Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private ceTe.DynamicPDF.Viewer.PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void NavigationToView()
{
// Navigate to previous view.
bool bResult = NavigateToPreviousView();
if(bResult)
MessageBox.Show("Successfully moved to previous view");
else
MessageBox.Show("There's no previous view to navigate");
}
}
}
Open(PdfDocument)
Opens a new PDF using PdfDocument .
public void Open(PdfDocument document)
Sub Open(document As PdfDocument)
Parameters
- document: PdfDocument
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.
Examples
This example shows, how to load a PDF document in PdfViewer using PdfDocument .
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
' Load and open the document in Viewer.
Dim MyDocument As New PdfDocument("C:\MyDocument.pdf")
MyPdfViewer.Open(MyDocument)
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 dpdfViewer;
public Form1()
{
InitializeComponent();
this.Load += new EventHandler(Form1_Load);
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, EventArgs e)
{
// Load and open the document in Viewer.
PdfDocument document = new PdfDocument(@"C:\MyDocument.pdf");
Open(document);
}
}
}
Open(String)
Opens a PDF document.
public void Open(string filePath)
Sub Open(filePath As String)
Parameters
- filePath: String
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.
Examples
This example shows, how to load a PDF document in PdfViewer .
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
' open the document using the file path.
MyPdfViewer.Open("C:\MyDocument.pdf")
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 dpdfViewer;
public Form1()
{
InitializeComponent();
this.Load += new EventHandler(Form1_Load);
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, EventArgs e)
{
// open the document using the file path.
Open(@"C:\MyDocument.pdf");
}
}
}
PerformLayout()
Forces the control to apply layout logic to all its child controls. (Inherited from Control)
public void PerformLayout()
Sub PerformLayout()
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.
PerformLayout(Control, String)
Forces the control to apply layout logic to all its child controls. (Inherited from Control)
public void PerformLayout(Control affectedControl, string affectedProperty)
Sub PerformLayout(affectedControl As Control, affectedProperty As String)
Parameters
- affectedControl: Control
A Control that represents the most recently changed control.
- affectedProperty: String
The name of the most recently changed property on the control.
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.
PointToClient(Point)
Computes the location of the specified screen point into client coordinates. (Inherited from Control)
public Point PointToClient(Point p)
Function PointToClient(p As Point) As Point
Parameters
- p: Point
The screen coordinate Point to convert.
Returns
A Point that represents the converted Point , , in client coordinates.
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.
PointToScreen(Point)
Computes the location of the specified client point into screen coordinates. (Inherited from Control)
public Point PointToScreen(Point p)
Function PointToScreen(p As Point) As Point
Parameters
- p: Point
The client coordinate Point to convert.
Returns
A Point that represents the converted Point , , in screen coordinates.
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.
PreProcessControlMessage(Message&)
Preprocesses keyboard or input messages within the message loop before they are dispatched. (Inherited from Control)
public PreProcessControlState PreProcessControlMessage(Message& msg)
Function PreProcessControlMessage(msg As Message&) As PreProcessControlState
Parameters
- msg: Message&
A Message that represents the message to process.
Returns
One of the PreProcessControlState values, depending on whether PreProcessMessage(System.Windows.Forms.Message@) is or and whether IsInputKey(System.Windows.Forms.Keys) or IsInputChar(System.Char) are or .
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.
PreProcessMessage(Message&)
Preprocesses keyboard or input messages within the message loop before they are dispatched. (Inherited from Control)
public bool PreProcessMessage(Message& msg)
Function PreProcessMessage(msg As Message&) As Boolean
Parameters
- msg: Message&
A Message , passed by reference, that represents the message to process. The possible values are WM_KEYDOWN, WM_SYSKEYDOWN, WM_CHAR, and WM_SYSCHAR.
Returns
if the message was processed by the control; otherwise, .
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.
Print()
Prints the document.
public void Print()
Sub Print()
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.
RectangleToClient(Rectangle)
Computes the size and location of the specified screen rectangle in client coordinates. (Inherited from Control)
public Rectangle RectangleToClient(Rectangle r)
Function RectangleToClient(r As Rectangle) As Rectangle
Parameters
- r: Rectangle
The screen coordinate Rectangle to convert.
Returns
A Rectangle that represents the converted Rectangle , , in client coordinates.
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.
RectangleToScreen(Rectangle)
Computes the size and location of the specified client rectangle in screen coordinates. (Inherited from Control)
public Rectangle RectangleToScreen(Rectangle r)
Function RectangleToScreen(r As Rectangle) As Rectangle
Parameters
- r: Rectangle
The client coordinate Rectangle to convert.
Returns
A Rectangle that represents the converted Rectangle , , in screen coordinates.
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.
Refresh()
Forces the control to invalidate its client area and immediately redraw itself and any child controls. (Inherited from Control)
public void Refresh()
Sub Refresh()
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.
ResetText()
Resets the Text property to its default value ( Empty ). (Inherited from Control)
public void ResetText()
Sub ResetText()
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.
ResumeLayout()
Resumes usual layout logic. (Inherited from Control)
public void ResumeLayout()
Sub ResumeLayout()
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.
ResumeLayout(Boolean)
Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests. (Inherited from Control)
public void ResumeLayout(bool performLayout)
Sub ResumeLayout(performLayout As Boolean)
Parameters
- performLayout: Boolean
to execute pending layout requests; otherwise, .
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.
Scale(SizeF)
Scales the control and all child controls by the specified scaling factor. (Inherited from Control)
public void Scale(SizeF factor)
Sub Scale(factor As SizeF)
Parameters
- factor: SizeF
A SizeF containing the horizontal and vertical scaling factors.
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.
ScaleBitmapLogicalToDevice(Bitmap&)
Scales a logical bitmap value to it's equivalent device unit value when a DPI change occurs. (Inherited from Control)
public void ScaleBitmapLogicalToDevice(Bitmap& logicalBitmap)
Sub ScaleBitmapLogicalToDevice(logicalBitmap As Bitmap&)
Parameters
- logicalBitmap: Bitmap&
The bitmap to scale.
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.
SearchBackward(String, MatchOptions)
Searches the string specified in backward direction.
public void SearchBackward(string searchString, MatchOptions option)
Sub SearchBackward(searchString As String, option As MatchOptions)
Parameters
- searchString: String
The string to be searched.
- option: MatchOptions
The match option to use for searching.
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.
Examples
The following example will show how to search a string in backward direction with match option.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub Search()
' Searches string in backward direction.
MyPdfViewer.SearchBackward("string", MatchOptions.WholeWordOnly)
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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void Search()
{
// Searches string in backward direction.
SearchBackward("string" , MatchOptions.WholeWordOnly);
}
}
}
Remarks
Search starts with firing SearchProgressing event. During search, Searched event will be fired if any match is found. SearchProgressing event is fired each time with Status 'Progressing' when the search finishes the current page and moves to next page. When search completed Searched event will be fired with Status 'Completed'. If user cancels the existing search through user interface or through code by invoking a new search, then Searched event will be fired with Status 'Canceled'. Change in the search term, options, search direction or invoking a new search when current search is progressing, will result in resetting of the current search.
SearchForward(String, MatchOptions)
Searches the string specified in forward direction.
public void SearchForward(string searchString, MatchOptions option)
Sub SearchForward(searchString As String, option As MatchOptions)
Parameters
- searchString: String
The string to be searched.
- option: MatchOptions
The match option to use for searching.
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.
Examples
The following example will show how to search a sring in forward direction with match option.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub Search() ' Searches string in forward direction. MyPdfViewer.SearchForward("string", MatchOptions.WholeWordOnly)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 dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
}
private void Search()
{
// Searches string in forward direction.
SearchForward("string" , MatchOptions.WholeWordOnly);
}
}
}
Remarks
Search starts with firing SearchProgressing event. During search, Searched event will be fired if any match is found. SearchProgressing event is fired each time with Status 'Progressing' when the search finishes the current page and moves to next page. When search completed Searched event will be fired with Status 'Completed'. If user cancels the existing search through user interface or through code by invoking a new search, then Searched event will be fired with Status 'Canceled'. Change in the search term, options, search direction or invoking a new search when current search is progressing, will result in resetting of the current search.
Select()
Activates the control. (Inherited from Control)
public void Select()
Sub Select()
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.
SelectNextControl(Control, Boolean, Boolean, Boolean, Boolean)
Activates the next control. (Inherited from Control)
public bool SelectNextControl(Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap)
Function SelectNextControl(ctl As Control, forward As Boolean, tabStopOnly As Boolean, nested As Boolean, wrap As Boolean) As Boolean
Parameters
- ctl: Control
The Control at which to start the search.
- forward: Boolean
to move forward in the tab order; to move backward in the tab order.
- tabStopOnly: Boolean
to ignore the controls with the TabStop property set to ; otherwise, .
- nested: Boolean
to include nested (children of child controls) child controls; otherwise, .
- wrap: Boolean
to continue searching from the first control in the tab order after the last control has been reached; otherwise, .
Returns
if a control was activated; otherwise, .
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.
SendToBack()
Sends the control to the back of the z-order. (Inherited from Control)
public void SendToBack()
Sub SendToBack()
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.
SetBounds(Int32, Int32, Int32, Int32)
Sets the bounds of the control to the specified location and size. (Inherited from Control)
public void SetBounds(int x, int y, int width, int height)
Sub SetBounds(x As Integer, y As Integer, width As Integer, height As Integer)
Parameters
- x: Int32
The new Left property value of the control.
- y: Int32
The new Top property value of the control.
- width: Int32
The new Width property value of the control.
- height: Int32
The new Height property value of the control.
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.
SetBounds(Int32, Int32, Int32, Int32, BoundsSpecified)
Sets the specified bounds of the control to the specified location and size. (Inherited from Control)
public void SetBounds(int x, int y, int width, int height, BoundsSpecified specified)
Sub SetBounds(x As Integer, y As Integer, width As Integer, height As Integer, specified As BoundsSpecified)
Parameters
- x: Int32
The new Left property value of the control.
- y: Int32
The new Top property value of the control.
- width: Int32
The new Width property value of the control.
- height: Int32
The new Height property value of the control.
- specified: BoundsSpecified
A bitwise combination of the BoundsSpecified values. For any parameter not specified, the current value will be used.
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.
Show()
Displays the control to the user. (Inherited from Control)
public void Show()
Sub Show()
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.
ShowAboutBox()
Shows an about box that contains version info.
public void ShowAboutBox()
Sub ShowAboutBox()
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.
SuspendLayout()
Temporarily suspends the layout logic for the control. (Inherited from Control)
public void SuspendLayout()
Sub SuspendLayout()
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 containing the name of the Component , if any. This method should not be overridden. (Inherited from Component)
public string ToString()
Function ToString() As String
Returns
A String containing the name of the Component , if any, or if the Component is unnamed.
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.
Update()
Causes the control to redraw the invalidated regions within its client area. (Inherited from Control)
public void Update()
Sub Update()
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.
Events
ClientSizeChanged
Occurs when the value of the ClientSize property changes. (Inherited from Control)
public event EventHandler PdfViewer.ClientSizeChanged;
Public Event PdfViewer.ClientSizeChanged As EventHandler
Event Handler
Licensing Info
This event 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.
ContextMenuShowing
Occurs when the control's context menu is being displayed.
public event ContextMenuShowingEventHandler PdfViewer.ContextMenuShowing;
Public Event PdfViewer.ContextMenuShowing As ContextMenuShowingEventHandler
Event Handler
ContextMenuShowingEventHandler
Licensing Info
This event 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
This example demonstrates, how to hide/show the context menu , override the context menu of the control with a new one and setting the type context using ContextMenuShowingEventArgs class.
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 MyPdfViewer.ContextMenuShowing, AddressOf MyPdfViewer_ContextMenuShowing
End Sub
Private Sub MyPdfViewer_ContextMenuShowing(ByVal sender As Object, ByVal e As ContextMenuShowingEventArgs)
' Suppress the control's existing context menu with a new context menu.
e.AssignedContextMenu = New ContextMenuStrip()
' Create new ToolStripMenuItem and add it to AssignedContextMenu.
Dim MyToolStripMenuitem1 As New ToolStripMenuItem()
MyToolStripMenuitem1.Text = "Rotate"
e.AssignedContextMenu.Items.Add(MyToolStripMenuitem1)
' Create new ToolStripMenuItem and add it to AssignedContextMenu.
Dim MyToolStripMenuitem2 As New ToolStripMenuItem()
MyToolStripMenuitem2.Text = "View"
e.AssignedContextMenu.Items.Add(MyToolStripMenuitem2)
' Set the value to hide/show the context menu.
e.Cancel = True
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
ContextMenuShowing += new ceTe.DynamicPDF.Viewer.ContextMenuShowingEventHandler(this.pdfViewer_ContextMenuShowing);
}
private void pdfViewer_ContextMenuShowing(object sender, ceTe.DynamicPDF.Viewer.ContextMenuShowingEventArgs e)
{
// Suppress the control's existing context menu with a new context menu.
e.AssignedContextMenu = new ContextMenuStrip();
// Create new ToolStripMenuItem and add it to AssignedContextMenu.
ToolStripMenuItem toolStripMenuitem1 = new ToolStripMenuItem();
toolStripMenuitem1.Text = "Rotate";
e.AssignedContextMenu.Items.Add(toolStripMenuitem1);
// Create new ToolStripMenuItem and add it to AssignedContextMenu.
ToolStripMenuItem toolStripMenuitem2 = new ToolStripMenuItem();
toolStripMenuitem2.Text = "View";
e.AssignedContextMenu.Items.Add(toolStripMenuitem2);
// Set the value to hide/show the context menu.
e.Cancel = true;
}
}
}
Remarks
If context menu displaying is disabled using this event, then both left and right mouse clicks will fire PdfViewerMouseClick event.
ControlAdded
Occurs when a new control is added to the ControlCollection . (Inherited from Control)
public event ControlEventHandler PdfViewer.ControlAdded;
Public Event PdfViewer.ControlAdded As ControlEventHandler
Event Handler
Licensing Info
This event 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.
ControlRemoved
Occurs when a control is removed from the ControlCollection . (Inherited from Control)
public event ControlEventHandler PdfViewer.ControlRemoved;
Public Event PdfViewer.ControlRemoved As ControlEventHandler
Event Handler
Licensing Info
This event 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.
CursorModeChanged
Occurs when the cursor mode is changed.
public event CursorModeChangedEventHandler PdfViewer.CursorModeChanged;
Public Event PdfViewer.CursorModeChanged As CursorModeChangedEventHandler
Event Handler
Licensing Info
This event 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
This example demonstrates, how to get the current cursor mode using CursorModeChangedEventArgs class.
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 MyPdfViewer.CursorModeChanged, AddressOf MyPdfViewer_CursorModeChanged
End Sub
Private Sub MyPdfViewer_CursorModeChanged(ByVal sender As Object, ByVal e As CursorModeChangedEventArgs)
' Get the current cursor mode.
Dim MyCursorMode As CursorMode = e.CursorMode
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
CursorModeChanged += new ceTe.DynamicPDF.Viewer.CursorModeChangedEventHandler(this.pdfViewer_CursorModeChanged);
}
private void pdfViewer_CursorModeChanged(object sender, ceTe.DynamicPDF.Viewer.CursorModeChangedEventArgs e)
{
// Get the current cursor mode.
CursorMode cursorMode = e.CursorMode;
}
}
}
DialogShowing
Occurs before the File open dialog and Print dialog is displayed.
public event DialogShowingEventHandler PdfViewer.DialogShowing;
Public Event PdfViewer.DialogShowing As DialogShowingEventHandler
Event Handler
Licensing Info
This event 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
This example shows, how to cancel a file open dialog display using DialogShowing event
Imports System
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer
Public Class Form1Inherits System.Windows.Forms.FormPrivate dpdfViewer As PdfViewer
Public Sub New() InitializeComponent()End Sub
[STAThread]Private Shared Sub Main() Application.Run(New Form1())End Sub
Private Sub InitializeComponent() Me.dpdfViewer = New PdfViewer() Me.Controls.Add(dpdfViewer) AddHandler DialogShowing, AddressOf Me.pdfViewer_DialogShowingEnd Sub
Private Sub pdfViewer_DialogShowing(sender As Object, e As ceTe.DynamicPDF.Viewer.DialogShowingEventArgs) ' Preventing File Open dialog from displaying using DialogShowing event. If e.DisplayingDialogType = DialogType.FileOpenDialog Then e.Cancel = True End IfEnd Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{public class Form1 : System.Windows.Forms.Form{ private PdfViewer dpdfViewer;
public Form1() { InitializeComponent(); }
static void Main() { Application.Run(new Form1()); }
private void InitializeComponent() { this.dpdfViewer = new PdfViewer(); this.Controls.Add(dpdfViewer); DialogShowing += new ceTe.DynamicPDF.Viewer.DialogShowingEventHandler(this.pdfViewer_DialogShowing); }
private void pdfViewer_DialogShowing(object sender, ceTe.DynamicPDF.Viewer.DialogShowingEventArgs e) { // Preventing File Open dialog from displaying using DialogShowing event. if (e.DisplayingDialogType == DialogType.FileOpenDialog) { e.Cancel = true; } }}
}
Disposed
Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component)
public event EventHandler PdfViewer.Disposed;
Public Event PdfViewer.Disposed As EventHandler
Event Handler
Licensing Info
This event 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.
DockChanged
Occurs when the value of the Dock property changes. (Inherited from Control)
public event EventHandler PdfViewer.DockChanged;
Public Event PdfViewer.DockChanged As EventHandler
Event Handler
Licensing Info
This event 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.
DocumentDisplayed
Occurs after the PDF document is displayed.
public event DocumentDisplayedEventHandler PdfViewer.DocumentDisplayed;
Public Event PdfViewer.DocumentDisplayed As DocumentDisplayedEventHandler
Event Handler
Licensing Info
This event 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
This example shows, how to get displayed PDF document details using DocumentDisplayed event.
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 MyPdfViewer.DocumentDisplayed, AddressOf MyPdfViewer_DocumentDisplayed
End Sub
Private Sub MyPdfViewer_DocumentDisplayed(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.DocumentDisplayedEventArgs)
' Get the displayed PDF document details.
Dim Author As String = e.Document.Author
Dim MyBookmarks As BookmarkList = e.Document.Bookmarks
Dim Creator As String = e.Document.Creator
Dim Keywords As String = e.Document.Keywords
Dim PageCount As Integer = e.Document.PageCount
Dim Producer As String = e.Document.Producer
Dim Subject As String = e.Document.Subject
Dim Title As String = e.Document.Title
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
DocumentDisplayed += new ceTe.DynamicPDF.Viewer.DocumentDisplayedEventHandler(this.pdfViewer_DocumentDisplayed);
}
private void pdfViewer_DocumentDisplayed(object sender, ceTe.DynamicPDF.Viewer.DocumentDisplayedEventArgs e)
{
// Get the displayed PDF document details.
string Author = e.Document.Author;
BookmarkList Bookmarks = e.Document.Bookmarks;
string Creator = e.Document.Creator;
string Keywords = e.Document.Keywords;
int PageCount = e.Document.PageCount;
string Producer = e.Document.Producer;
string Subject = e.Document.Subject;
string Title = e.Document.Title;
}
}
}
DocumentDisplaying
Occurs before the PDF document is displayed.
public event DocumentDisplayingEventHandler PdfViewer.DocumentDisplaying;
Public Event PdfViewer.DocumentDisplaying As DocumentDisplayingEventHandler
Event Handler
DocumentDisplayingEventHandler
Licensing Info
This event 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
This example shows, how to cancel a PDF file opening using DocumentDisplaying event
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 MyPdfViewer.DocumentDisplaying, AddressOf MyPdfViewer_DocumentDisplaying
End Sub
Private Sub MyPdfViewer_DocumentDisplaying(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.DocumentDisplayingEventArgs)
' Setting the navigation panel's visible tab while displaying the document.
e.InitialVisibleNavigationPane = ceTe.DynamicPDF.Viewer.NavigationPane.Bookmark
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
DocumentDisplaying += new ceTe.DynamicPDF.Viewer.DocumentDisplayingEventHandler(this.pdfViewer_DocumentDisplaying);
}
private void pdfViewer_DocumentDisplaying(object sender, ceTe.DynamicPDF.Viewer.DocumentDisplayingEventArgs e)
{
// Setting the navigation panel's visible tab while displaying the document.
e.InitialVisibleNavigationPane = ceTe.DynamicPDF.Viewer.NavigationPane.Bookmark;
}
}
}
DocumentPrinted
Occurs after the printing of the last page of the PDF document.
public event DocumentPrintedEventHandler PdfViewer.DocumentPrinted;
Public Event PdfViewer.DocumentPrinted As DocumentPrintedEventHandler
Event Handler
Licensing Info
This event 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.
DocumentPrinting
Occurs before the start of the PDF document printing.
public event DocumentPrintingEventHandler PdfViewer.DocumentPrinting;
Public Event PdfViewer.DocumentPrinting As DocumentPrintingEventHandler
Event Handler
Licensing Info
This event 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.
DpiChangedAfterParent
Occurs when the DPI setting for a control is changed programmatically after the DPI of its parent control or form has changed. (Inherited from Control)
public event EventHandler PdfViewer.DpiChangedAfterParent;
Public Event PdfViewer.DpiChangedAfterParent As EventHandler
Event Handler
Licensing Info
This event 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.
DpiChangedBeforeParent
Occurs when the DPI setting for a control is changed programmatically before a DPI change event for its parent control or form has occurred. (Inherited from Control)
public event EventHandler PdfViewer.DpiChangedBeforeParent;
Public Event PdfViewer.DpiChangedBeforeParent As EventHandler
Event Handler
Licensing Info
This event 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.
DragDrop
Occurs when a drag-and-drop operation is completed. (Inherited from Control)
public event DragEventHandler PdfViewer.DragDrop;
Public Event PdfViewer.DragDrop As DragEventHandler
Event Handler
Licensing Info
This event 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.
DragEnter
Occurs when an object is dragged into the control's bounds. (Inherited from Control)
public event DragEventHandler PdfViewer.DragEnter;
Public Event PdfViewer.DragEnter As DragEventHandler
Event Handler
Licensing Info
This event 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.
DragLeave
Occurs when an object is dragged out of the control's bounds. (Inherited from Control)
public event EventHandler PdfViewer.DragLeave;
Public Event PdfViewer.DragLeave As EventHandler
Event Handler
Licensing Info
This event 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.
DragOver
Occurs when an object is dragged over the control's bounds. (Inherited from Control)
public event DragEventHandler PdfViewer.DragOver;
Public Event PdfViewer.DragOver As DragEventHandler
Event Handler
Licensing Info
This event 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.
EnabledChanged
Occurs when the Enabled property value has changed. (Inherited from Control)
public event EventHandler PdfViewer.EnabledChanged;
Public Event PdfViewer.EnabledChanged As EventHandler
Event Handler
Licensing Info
This event 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.
Enter
Occurs when the control is entered. (Inherited from Control)
public event EventHandler PdfViewer.Enter;
Public Event PdfViewer.Enter As EventHandler
Event Handler
Licensing Info
This event 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.
ExceptionOccurred
Occurs before the PDF file is opened.
public event ExceptionOccurredEventHandler PdfViewer.ExceptionOccurred;
Public Event PdfViewer.ExceptionOccurred As ExceptionOccurredEventHandler
Event Handler
Licensing Info
This event 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
This example shows, how to cancel a PDF file open using the FileOpening event.
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer
Namespace DynamicPDFViewerDemoPublic Class Form1 Inherits Form Private dpdfViewer As PdfViewer
Public Sub New() InitializeComponent() End Sub
Public Shared Sub Main() Application.Run(New Form1()) End Sub
Private Sub InitializeComponent() Me.dpdfViewer = New PdfViewer() Me.Controls.Add(dpdfViewer) AddHandler Me.ExceptionOccurred, New ExceptionOccurredEventHandler(AddressOf pdfViewer_ExceptionOccurred) End Sub
Private Sub pdfViewer_ExceptionOccurred(sender As Object, e As ExceptionOccurredEventArgs) MessageBox.Show(e.Exception.Message) End SubEnd Class
End Namespace
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{public class Form1 : Form{ private PdfViewer dpdfViewer;
public Form1() { InitializeComponent(); }
[STAThread] static void Main() { Application.Run(new Form1()); }
private void InitializeComponent() { this.dpdfViewer = new PdfViewer(); this.Controls.Add(dpdfViewer); this.ExceptionOccurred += pdfViewer_ExceptionOccurred; }
void pdfViewer_ExceptionOccurred(object sender, ExceptionOccurredEventArgs e) { MessageBox.Show(e.Exception.Message); }
}
}
FileOpenDialogShowing
Occurs when the file open dialog is being displayed.
public event FileOpenDialogShowingEventHandler PdfViewer.FileOpenDialogShowing;
Public Event PdfViewer.FileOpenDialogShowing As FileOpenDialogShowingEventHandler
Event Handler
FileOpenDialogShowingEventHandler
Licensing Info
This event 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
This example shows, how to set initial directory of displaying file dialog using FileOpenDialogShowing event.
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 MyPdfViewer.FileOpenDialogShowing, AddressOf MyPdfViewer_FileOpenDialogShowing
End Sub
Private Sub MyPdfViewer_FileOpenDialogShowing(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.FileOpenDialogShowingEventArgs)
' Set the initial directory for the file dialog window.
e.InitialDirectory = "MyFolderPath"
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
FileOpenDialogShowing += new ceTe.DynamicPDF.Viewer.FileOpenDialogShowingEventHandler(this.pdfViewer_FileOpenDialogShowing);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void pdfViewer_FileOpenDialogShowing(object sender, ceTe.DynamicPDF.Viewer.FileOpenDialogShowingEventArgs e)
{
// Set the initial directory for the file dialog window.
e.InitialDirectory = "MyFolderPath";
}
}
}
FileOpened
Occurs after the PDF file is opened.
public event FileOpenedEventHandler PdfViewer.FileOpened;
Public Event PdfViewer.FileOpened As FileOpenedEventHandler
Event Handler
Licensing Info
This event 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
This example shows, how to get displayed PDF document details using FileOpened event.
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 MyPdfViewer.FileOpened, AddressOf MyPdfViewer_FileOpened
End Sub
Private Sub MyPdfViewer_FileOpened(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.FileOpenedEventArgs)
' Get the displayed PDF document details.
Dim Author As String = e.PdfDocument.Author
Dim MyBookmarks As BookmarkList = e.PdfDocument.Bookmarks
Dim Creator As String = e.PdfDocument.Creator
Dim Keywords As String = e.PdfDocument.Keywords
Dim PageCount As Integer = e.PdfDocument.PageCount
Dim Producer As String = e.PdfDocument.Producer
Dim Subject As String = e.PdfDocument.Subject
Dim Title As String = e.PdfDocument.Title
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
FileOpened += new ceTe.DynamicPDF.Viewer.FileOpenedEventHandler(this.pdfViewer_FileOpened);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void pdfViewer_FileOpened(object sender, ceTe.DynamicPDF.Viewer.FileOpenedEventArgs e)
{
// Getting displayed PDF document details.
string Author = e.PdfDocument.Author;
BookmarkList Bookmarks = e.PdfDocument.Bookmarks;
string Creator = e.PdfDocument.Creator;
string Keywords = e.PdfDocument.Keywords;
int PageCount = e.PdfDocument.PageCount;
string Producer = e.PdfDocument.Producer;
string Subject = e.PdfDocument.Subject;
string Title = e.PdfDocument.Title;
}
}
}
FileOpenFailed
Occurs when the PDF file open failed.
public event FileOpenFailedEventHandler PdfViewer.FileOpenFailed;
Public Event PdfViewer.FileOpenFailed As FileOpenFailedEventHandler
Event Handler
Licensing Info
This event 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
This example shows ,how to access exception details using FileOpenFailed event, in the case of PDF document open failure.
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 MyPdfViewer.FileOpenFailed, AddressOf MyPdfViewer_FileOpenFailed
End Sub
Private Sub MyPdfViewer_FileOpenFailed(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.FileOpenFailedEventArgs)
' Get the exception.
Dim failReason As String = e.Exception.Message
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
FileOpenFailed += new ceTe.DynamicPDF.Viewer.FileOpenFailedEventHandler(this.pdfViewer_FileOpenFailed);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void pdfViewer_FileOpenFailed(object sender, ceTe.DynamicPDF.Viewer.FileOpenFailedEventArgs e)
{
// Get the exception.
string failReason = e.Exception.Message;
}
}
}
FileOpening
Occurs before the PDF file is opened.
public event FileOpeningEventHandler PdfViewer.FileOpening;
Public Event PdfViewer.FileOpening As FileOpeningEventHandler
Event Handler
Licensing Info
This event 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
This example shows, how to cancel a PDF file open using the FileOpening event.
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
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
AddHandler MyPdfViewer.FileOpening, AddressOf MyPdfViewer_FileOpening
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub MyPdfViewer_FileOpening(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.FileOpeningEventArgs)
' Cancel the file open.
e.Cancel = True
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
FileOpening += new ceTe.DynamicPDF.Viewer.FileOpeningEventHandler(this.pdfViewer_FileOpening);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void pdfViewer_FileOpening(object sender, ceTe.DynamicPDF.Viewer.FileOpeningEventArgs e)
{
// Cancel the file open.
e.Cancel = true;
}
}
}
FontChanged
Occurs when the Font property value changes. (Inherited from Control)
public event EventHandler PdfViewer.FontChanged;
Public Event PdfViewer.FontChanged As EventHandler
Event Handler
Licensing Info
This event 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.
ForeColorChanged
Occurs when the ForeColor property value changes. (Inherited from Control)
public event EventHandler PdfViewer.ForeColorChanged;
Public Event PdfViewer.ForeColorChanged As EventHandler
Event Handler
Licensing Info
This event 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.
GiveFeedback
Occurs during a drag operation. (Inherited from Control)
public event GiveFeedbackEventHandler PdfViewer.GiveFeedback;
Public Event PdfViewer.GiveFeedback As GiveFeedbackEventHandler
Event Handler
Licensing Info
This event 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.
GotFocus
Occurs when the control receives focus. (Inherited from Control)
public event EventHandler PdfViewer.GotFocus;
Public Event PdfViewer.GotFocus As EventHandler
Event Handler
Licensing Info
This event 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.
HandleCreated
Occurs when a handle is created for the control. (Inherited from Control)
public event EventHandler PdfViewer.HandleCreated;
Public Event PdfViewer.HandleCreated As EventHandler
Event Handler
Licensing Info
This event 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.
HandleDestroyed
Occurs when the control's handle is in the process of being destroyed. (Inherited from Control)
public event EventHandler PdfViewer.HandleDestroyed;
Public Event PdfViewer.HandleDestroyed As EventHandler
Event Handler
Licensing Info
This event 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.
HelpRequested
Occurs when the user requests help for a control. (Inherited from Control)
public event HelpEventHandler PdfViewer.HelpRequested;
Public Event PdfViewer.HelpRequested As HelpEventHandler
Event Handler
Licensing Info
This event 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.
ImeModeChanged
Occurs when the ImeMode property has changed. (Inherited from Control)
public event EventHandler PdfViewer.ImeModeChanged;
Public Event PdfViewer.ImeModeChanged As EventHandler
Event Handler
Licensing Info
This event 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.
Invalidated
Occurs when a control's display requires redrawing. (Inherited from Control)
public event InvalidateEventHandler PdfViewer.Invalidated;
Public Event PdfViewer.Invalidated As InvalidateEventHandler
Event Handler
Licensing Info
This event 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.
Layout
Occurs when a control should reposition its child controls. (Inherited from Control)
public event LayoutEventHandler PdfViewer.Layout;
Public Event PdfViewer.Layout As LayoutEventHandler
Event Handler
Licensing Info
This event 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.
Leave
Occurs when the input focus leaves the control. (Inherited from Control)
public event EventHandler PdfViewer.Leave;
Public Event PdfViewer.Leave As EventHandler
Event Handler
Licensing Info
This event 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.
LinkClicked
Occurs when user clicks on a link.
public event LinkClickEventHandler PdfViewer.LinkClicked;
Public Event PdfViewer.LinkClicked As LinkClickEventHandler
Event Handler
Licensing Info
This event 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
This example demonstrates, how to get the link Action and how to cancel the action associated with the link using LinkClickedEventArgs class.
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 MyPdfViewer.LinkClicked, AddressOf MyPdfViewer_LinkClicked
End Sub
Private Sub MyPdfViewer_LinkClicked(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.LinkClickedEventArgs)
' Get the action associated with the link.
Dim MyAction As ceTe.DynamicPDF.Viewer.Action = e.Action
' Get the action type.
Dim MyActionType As ceTe.DynamicPDF.Viewer.ActionType = MyAction.ActionType
' Cancel the action associated with the link
e.Cancel = True
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
LinkClicked += new ceTe.DynamicPDF.Viewer.LinkClickEventHandler(this.pdfViewer_LinkClicked);
}
private void pdfViewer_LinkClicked(object sender, ceTe.DynamicPDF.Viewer.LinkClickedEventArgs e)
{
// Get the action associated with the link.
ceTe.DynamicPDF.Viewer.Action action = e.Action;
// Get the action type.
ceTe.DynamicPDF.Viewer.ActionType actionType = action.ActionType;
// Cancel the action associated with the link
e.Cancel = true;
}
}
}
LocationChanged
Occurs when the Location property value has changed. (Inherited from Control)
public event EventHandler PdfViewer.LocationChanged;
Public Event PdfViewer.LocationChanged As EventHandler
Event Handler
Licensing Info
This event 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.
LostFocus
Occurs when the control loses focus. (Inherited from Control)
public event EventHandler PdfViewer.LostFocus;
Public Event PdfViewer.LostFocus As EventHandler
Event Handler
Licensing Info
This event 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.
MarginChanged
Occurs when the control's margin changes. (Inherited from Control)
public event EventHandler PdfViewer.MarginChanged;
Public Event PdfViewer.MarginChanged As EventHandler
Event Handler
Licensing Info
This event 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.
Move
Occurs when the control is moved. (Inherited from Control)
public event EventHandler PdfViewer.Move;
Public Event PdfViewer.Move As EventHandler
Event Handler
Licensing Info
This event 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.
PaddingChanged
Occurs when the control's padding changes. (Inherited from Control)
public event EventHandler PdfViewer.PaddingChanged;
Public Event PdfViewer.PaddingChanged As EventHandler
Event Handler
Licensing Info
This event 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.
PagePrinting
Occurs before the start of printing a PDF page.
public event PagePrintingEventHandler PdfViewer.PagePrinting;
Public Event PdfViewer.PagePrinting As PagePrintingEventHandler
Event Handler
Licensing Info
This event 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.
Paint
Occurs when the control is redrawn. (Inherited from Control)
public event PaintEventHandler PdfViewer.Paint;
Public Event PdfViewer.Paint As PaintEventHandler
Event Handler
Licensing Info
This event 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.
ParentChanged
Occurs when the Parent property value changes. (Inherited from Control)
public event EventHandler PdfViewer.ParentChanged;
Public Event PdfViewer.ParentChanged As EventHandler
Event Handler
Licensing Info
This event 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.
PasswordRequired
Occurs when the PDF file needed a password to open.
public event PasswordRequiredEventHandler PdfViewer.PasswordRequired;
Public Event PdfViewer.PasswordRequired As PasswordRequiredEventHandler
Event Handler
Licensing Info
This event 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
This example shows,how to set password of a PDF file using PasswordRequired event
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 MyPdfViewer.PasswordRequired, AddressOf pdfViewer_PasswordRequired
End Sub
Private Sub pdfViewer_PasswordRequired(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.PasswordRequiredEventArgs)
' Setting PDF password to open the file.
e.Password = "mypassword"
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
PasswordRequired += new ceTe.DynamicPDF.Viewer.PasswordRequiredEventHandler(this.pdfViewer_PasswordRequired);
}
private void pdfViewer_PasswordRequired(object sender, ceTe.DynamicPDF.Viewer.PasswordRequiredEventArgs e)
{
// Setting PDF password to open the file.
e.Password = "mypassword";
}
}
}
PdfViewerMouseClick
Occurs when user clicks on a PdfViewer control.
public event PdfViewerMouseEventHandler PdfViewer.PdfViewerMouseClick;
Public Event PdfViewer.PdfViewerMouseClick As PdfViewerMouseEventHandler
Event Handler
Licensing Info
This event 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
This example demonstrates, how to get the click event with information about the page co-ordinates using PdfViewerMouseEventArgs class.
Imports System
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer
Imports System.Drawing
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 MyPdfViewer.PdfViewerMouseClick, AddressOf MyPdfViewer_MouseClicked
End Sub
Private Sub MyPdfViewer_MouseClicked(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.PdfViewerMouseEventArgs)
' Get the co-ordinates on the control.
Dim ControlCoordinate As Point = e.Location
' Get the page number.
Dim PageNumber As Integer = e.PageNumber
' Get the co-ordinates on the page (in PDF points).
Dim PageCoordinateX As Integer = e.PageX
Dim PageCoordinateY As Integer = e.PageY
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
using System.Drawing;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
PdfViewerMouseClick += new ceTe.DynamicPDF.Viewer.PdfViewerMouseEventHandler(this.pdfViewer_MouseClicked);
}
private void pdfViewer_MouseClicked(object sender, ceTe.DynamicPDF.Viewer.PdfViewerMouseEventArgs e)
{
// Get the co-ordinates on the control.
Point controlCoordinate = e.Location;
// Get the page number.
int pageNumber = e.PageNumber;
// Get the co-ordinates on the page (in PDF points).
int pageCoordinateX = e.PageX;
int pageCoordinateY = e.PageY;
}
}
}
Remarks
By default this event fires only for left mouse click. For handling right mouse click ContextMenuShowing event can be used. If context menu displaying is disabled using ContextMenuShowing event, then both left and right mouse clicks will fire this event.
PdfViewerMouseMove
Occurs when user moves the mouse pointer on a PdfViewer control.
public event PdfViewerMouseEventHandler PdfViewer.PdfViewerMouseMove;
Public Event PdfViewer.PdfViewerMouseMove As PdfViewerMouseEventHandler
Event Handler
Licensing Info
This event 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
This example demonstrates, how to get the mouse move event with information about the page co-ordinates using PdfViewerMouseEventArgs class.
Imports System
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer
Imports System.Drawing
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 MyPdfViewer.PdfViewerMouseMove, AddressOf MyPdfViewer_MouseMoved
End Sub
Private Sub MyPdfViewer_MouseMoved(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.PdfViewerMouseEventArgs)
' Get the co-ordinates on the control.
Dim ControlCoordinate As Point = e.Location
' Get the page number.
Dim PageNumber As Integer = e.PageNumber
' Get the co-ordinates on the page (in PDF points).
Dim PageCoordinateX As Integer = e.PageX
Dim PageCoordinateY As Integer = e.PageY
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
using System.Drawing;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
PdfViewerMouseMove += new ceTe.DynamicPDF.Viewer.PdfViewerMouseEventHandler(this.pdfViewer_MouseMoved);
}
private void pdfViewer_MouseMoved(object sender, ceTe.DynamicPDF.Viewer.PdfViewerMouseEventArgs e)
{
// Get the co-ordinates on the control.
Point controlCoordinate = e.Location;
// Get the page number.
int pageNumber = e.PageNumber;
// Get the co-ordinates on the page (in PDF points).
int pageCoordinateX = e.PageX;
int pageCoordinateY = e.PageY;
}
}
}
QueryAccessibilityHelp
Occurs when AccessibleObject is providing help to accessibility applications. (Inherited from Control)
public event QueryAccessibilityHelpEventHandler PdfViewer.QueryAccessibilityHelp;
Public Event PdfViewer.QueryAccessibilityHelp As QueryAccessibilityHelpEventHandler
Event Handler
QueryAccessibilityHelpEventHandler
Licensing Info
This event 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.
QueryContinueDrag
Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled. (Inherited from Control)
public event QueryContinueDragEventHandler PdfViewer.QueryContinueDrag;
Public Event PdfViewer.QueryContinueDrag As QueryContinueDragEventHandler
Event Handler
Licensing Info
This event 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.
RegionChanged
Occurs when the value of the Region property changes. (Inherited from Control)
public event EventHandler PdfViewer.RegionChanged;
Public Event PdfViewer.RegionChanged As EventHandler
Event Handler
Licensing Info
This event 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.
Resize
Occurs when the control is resized. (Inherited from Control)
public event EventHandler PdfViewer.Resize;
Public Event PdfViewer.Resize As EventHandler
Event Handler
Licensing Info
This event 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.
RightToLeftChanged
Occurs when the RightToLeft property value changes. (Inherited from Control)
public event EventHandler PdfViewer.RightToLeftChanged;
Public Event PdfViewer.RightToLeftChanged As EventHandler
Event Handler
Licensing Info
This event 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.
SearchDialogShowing
Occurs when the search dialog is being displayed.
public event SearchDialogShowingEventHandler PdfViewer.SearchDialogShowing;
Public Event PdfViewer.SearchDialogShowing As SearchDialogShowingEventHandler
Event Handler
SearchDialogShowingEventHandler
Licensing Info
This event 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
This example shows, how to hide the search dialog and set the match option for search using SearchDialogShowing event.
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 MyPdfViewer.SearchDialogShowing, AddressOf MyPdfViewer_SearchDialogShowing
End Sub
Private Sub MyPdfViewer_SearchDialogShowing(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.SearchDialogShowingEventArgs)
' Hide the search dialog.
e.Cancel = True
' Set the match option for search
e.MatchOption = MatchOptions.WholeWordOnly
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
SearchDialogShowing += new ceTe.DynamicPDF.Viewer.SearchDialogShowingEventHandler(this.pdfViewer_SearchDialogShowing);
}
private void pdfViewer_SearchDialogShowing(object sender, ceTe.DynamicPDF.Viewer.SearchDialogShowingEventArgs e)
{
// Hide the search dialog.
e.Cancel = true;
// Set the match option for search
e.MatchOption = MatchOptions.WholeWordOnly;
}
}
}
Searched
Occurs when the search term is found successfully.
public event SearchedEventHandler PdfViewer.Searched;
Public Event PdfViewer.Searched As SearchedEventHandler
Event Handler
Licensing Info
This event 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
This example demonstrates, how to get the count of successful search results and status of search completion using SearchedEventArgs class.
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 MyPdfViewer.Searched, AddressOf pdfViewer_Searched
End Sub
Private Sub pdfViewer_Searched(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.SearchedEventArgs)
' Get the status of search completion.
Dim searchStatus As SearchStatus = e.Status
' Get the count of search results found.
Dim count As Integer = e.Count
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
Searched += new ceTe.DynamicPDF.Viewer.SearchedEventHandler(this.pdfViewer_Searched);
}
private void pdfViewer_Searched(object sender, ceTe.DynamicPDF.Viewer.SearchedEventArgs e)
{
// Get the status of search completion.
SearchStatus searchStatus = e.Status;
// Get the count of search results found.
int count = e.Count;
}
}
}
SearchProgressing
Occurs when the search for a string is in progress.
public event SearchProgressingEventHandler PdfViewer.SearchProgressing;
Public Event PdfViewer.SearchProgressing As SearchProgressingEventHandler
Event Handler
Licensing Info
This event 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
This example demonstrates, how to get the search term, match option used, current page numberwhere search is going on and cancelling the search using SearchProgressingEventArgs class.
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 MyPdfViewer.SearchProgressing, AddressOf MyPdfViewer_SearchProgressing
End Sub
Private Sub MyPdfViewer_SearchProgressing(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.SearchProgressingEventArgs)
' Get the search string.
Dim MysearchTerm As String = e.SearchTerm
' Get the Match option used for searching.
Dim [option] As MatchOptions = DirectCast(e.MatchOption, MatchOptions)
' If user wants to cancel the search. Use the below commented code.
'e.Cancel = true;
' Get the current page number where search is in progress.
Dim pagenumber As Integer = e.CurrentPageNumber
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
SearchProgressing += new ceTe.DynamicPDF.Viewer.SearchProgressingEventHandler(this.pdfViewer_SearchProgressing);
}
private void pdfViewer_SearchProgressing(object sender, ceTe.DynamicPDF.Viewer.SearchProgressingEventArgs e)
{
// Get the search string.
string searchTerm = e.SearchTerm;
// Get the Match option used for searching.
MatchOptions option = (MatchOptions)e.MatchOption;
// If user wants to cancel the search. Use the below commented code.
//e.Cancel = true;
// Get the current page number where search is in progress.
int pagenumber = e.CurrentPageNumber;
}
}
}
Remarks
To cancel the search which is in progress set the value of Cancel to true otherwise by default it is false.
SizeChanged
Occurs when the Size property value changes. (Inherited from Control)
public event EventHandler PdfViewer.SizeChanged;
Public Event PdfViewer.SizeChanged As EventHandler
Event Handler
Licensing Info
This event 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.
StyleChanged
Occurs when the control style changes. (Inherited from Control)
public event EventHandler PdfViewer.StyleChanged;
Public Event PdfViewer.StyleChanged As EventHandler
Event Handler
Licensing Info
This event 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.
SystemColorsChanged
Occurs when the system colors change. (Inherited from Control)
public event EventHandler PdfViewer.SystemColorsChanged;
Public Event PdfViewer.SystemColorsChanged As EventHandler
Event Handler
Licensing Info
This event 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.
TabIndexChanged
Occurs when the TabIndex property value changes. (Inherited from Control)
public event EventHandler PdfViewer.TabIndexChanged;
Public Event PdfViewer.TabIndexChanged As EventHandler
Event Handler
Licensing Info
This event 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.
TabStopChanged
Occurs when the TabStop property value changes. (Inherited from Control)
public event EventHandler PdfViewer.TabStopChanged;
Public Event PdfViewer.TabStopChanged As EventHandler
Event Handler
Licensing Info
This event 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.
TextSelected
Occurs when the text selection is completed.
public event TextSelectedEventHandler PdfViewer.TextSelected;
Public Event PdfViewer.TextSelected As TextSelectedEventHandler
Event Handler
Licensing Info
This event 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
This example shows how to get selected text, when text selection done using TextSelected event.
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 MyPdfViewer.TextSelected, AddressOf MyPdfViewer_TextSelected
End Sub
Private Sub MyPdfViewer_TextSelected(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.TextSelectedEventArgs) ' Get the selected text.
Dim MySelectedText As String = e.SelectedText
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
TextSelected += new ceTe.DynamicPDF.Viewer.TextSelectedEventHandler(this.pdfViewer_TextSelected);
}
private void pdfViewer_TextSelected(object sender, ceTe.DynamicPDF.Viewer.TextSelectedEventArgs e)
{
// Get the selected text.
string selectedText = e.SelectedText;
}
}
}
TextSelecting
Occurs when the text is being selected.
public event TextSelectingEventHandler PdfViewer.TextSelecting;
Public Event PdfViewer.TextSelecting As TextSelectingEventHandler
Event Handler
Licensing Info
This event 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
This example shows how to disable or cancel text selection using TextSelecting event.
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 MyPdfViewer.TextSelecting, AddressOf MyPdfViewer_TextSelecting
End Sub
Private Sub MyPdfViewer_TextSelecting(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.TextSelectingEventArgs)
' Cencel the text selection.
e.Cancel = True
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
TextSelecting += new ceTe.DynamicPDF.Viewer.TextSelectingEventHandler(this.pdfViewer_TextSelecting);
}
private void pdfViewer_TextSelecting(object sender, ceTe.DynamicPDF.Viewer.TextSelectingEventArgs e)
{
// Cancel the text selection.
e.Cancel = true;
}
}
}
Validated
Occurs when the control is finished validating. (Inherited from Control)
public event EventHandler PdfViewer.Validated;
Public Event PdfViewer.Validated As EventHandler
Event Handler
Licensing Info
This event 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.
Validating
Occurs when the control is validating. (Inherited from Control)
public event CancelEventHandler PdfViewer.Validating;
Public Event PdfViewer.Validating As CancelEventHandler
Event Handler
Licensing Info
This event 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.
ViewChanged
Occurs each time when the view of the display is changed.
public event ViewChangedEventHandler PdfViewer.ViewChanged;
Public Event PdfViewer.ViewChanged As ViewChangedEventHandler
Event Handler
Licensing Info
This event 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
This example demonstrates, how to get the changed view and add it to history using ViewChangedEventArgs class.
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 MyPdfViewer.ViewChanged, AddressOf MyPdfViewer_ViewChanged
End Sub
Private Sub MyPdfViewer_ViewChanged(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.ViewChangedEventArgs)
' Get the changed view.
Dim changedView As ceTe.DynamicPDF.Viewer.View = e.PreviousView
' Setting to false, will exclude this view from storing into the view history.
e.AddViewToHistory = False
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
ViewChanged += new ceTe.DynamicPDF.Viewer.ViewChangedEventHandler(this.pdfViewer_ViewChanged);
}
private void pdfViewer_ViewChanged(object sender, ceTe.DynamicPDF.Viewer.ViewChangedEventArgs e)
{
// Get the changed view.
ceTe.DynamicPDF.Viewer.View changedView = e.PreviousView;
// Setting to false, will exclude this view from storing into the view history.
e.AddViewToHistory = false;
}
}
}
VisibleChanged
Occurs when the Visible property value changes. (Inherited from Control)
public event EventHandler PdfViewer.VisibleChanged;
Public Event PdfViewer.VisibleChanged As EventHandler
Event Handler
Licensing Info
This event 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.