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.
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
//We assume that the GdViewer1 control has been properly integrated.
//Add the event.
GdViewer1.PdfFileNavigation += GdViewer1_PdfFileNavigation;
//Enabling PDF file links handling.
PdfEnableFileLinks = true;
//Define the event.
void GdViewer1_PdfFileNavigation(ref string FilePath, ref bool Cancel)
{
MessageBox.Show("The filename is: " + FilePath, "GdViewer.PdfFileNavigation");
//Turning this parameter to true disables automatic handling of the file by the toolkit.
Cancel = true;
}