Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfViewer.GoToDestination(String) Method

Navigates to the specified destination.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v24.2.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