Skip to main content
A newer version of this page is available. .
All docs
V22.1

PdfViewer.GoToDestination(String) Method

Navigates to the specified destination.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v22.1.dll

NuGet Package: DevExpress.Win.PdfViewer

Declaration

public bool GoToDestination(
    string destinationName
)

Parameters

Name Type Description
destinationName String

The name of the destination to which the PDF Viewer should navigate.

Returns

Type Description
Boolean

true if the operation is performed successfully; otherwise, false.

Remarks

Use the PdfViewer.DestinationNames proeprty to obtain a list of destination names.

Example

The code sample below shows how to navigate to a destination when the document is loaded:

using DevExpress.XtraPdfViewer;
using System.Linq;
//...
pdfViewer.DocumentChanged += pdfViewer_DocumentChanged;

private void pdfViewer_DocumentChanged(object sender, PdfDocumentChangedEventArgs e) {
    var destNames = pdfViewer.DestinationNames;
    var dest = destNames.Where(x => x.Contains("Page 6")).First();
    pdfViewer.GoToDestination(dest);
}
See Also