GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / PdfFileNavigation Event
Example





PdfFileNavigation Event (GdViewer)
This event is raised when a GoToR action contained in the displayed PDF document has been triggered to open a linked file. The event only occurs if the GdViewer.PdfEnableFileLinks property is set to true.

Please check the corresponded GdViewer.PdfFileNavigationEventHandler for given parameters.

Syntax
'Declaration
 
Public Event PdfFileNavigation As GdViewer.PdfFileNavigationEventHandler
 
Remarks
This event is only meaningful for PDF documents and it is solely raised only if the GdViewer.PdfEnableFileLinks property is set to true. At the same, this event only handles the file links defined by the GoToR action in PDF documents.
Example
How to add and use this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
            
'Add the event.
AddHandler GdViewer1.PdfFileNavigation, AddressOf GdViewer1_PdfFileNavigation
            
'Enabling PDF file links handling.
PdfEnableFileLinks = True
            
'Define the event.
Sub GdViewer1_PdfFileNavigation(ByRef FilePath As String, ByRef Cancel As Boolean) Handles GdViewer1.PdfFileNavigation
    MessageBox.Show("The filename is: " + FilePath, "GdViewer.PdfFileNavigation")
    'Turning this parameter to True disables automatic handling of the file by the toolkit.
    Cancel = True
End Sub
See Also