GdPicture.NET.14
GdPicture14.WPF Namespace / GdViewer Class / PdfEnableLinks Property
Example





PdfEnableLinks Property (GdViewer)
Specifies whether the GdViewer control will follow a hyperlink contained in the displayed PDF document when a user clicks that hyperlink.

Setting this property to true allows users to open web links contained in the loaded PDF documents. Turning this property to false will disable this behaviour.

The PdfUriNavigation event is raised before navigating to the specified hyperlink.

Syntax
'Declaration
 
Public Property PdfEnableLinks As Boolean
 

Property Value

The default value is true.
Remarks
This property is only meaningful for PDF documents. At the same, this property only relates to web links in PDF documents.

Just to remind you, that you can benefit from using the PdfUriNavigation event to handle the specified hyperlink by your own.

Example
How to utilize this property in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated
'and the PdfUriNavigation event has been properly added.
            
'Enabling hyperlink navigation handling.
PdfEnableLinks = True
            
'Define the event.
Sub GdViewer1_PdfUriNavigation(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.PdfUriNavigationEventArgs)
    MessageBox.Show("The hyperlink is: " + e.URI, "GdViewer.PdfEnableLinks")
    'Turning this parameter to true disables automatic handling of the specified hyperlink by the toolkit.
    e.Cancel = True
    'You can handle the hyperlink by your own here.
End Sub
See Also