Bookmark Navigation in UWP PDF Viewer (SfPdfViewer)

13 Jul 20261 minute to read

The SfPdfViewer control allows users to navigate to the bookmarks present in the loaded PDF document. This section covers programmatic navigation using the GoToBookmark method.

Programmatically navigate to a bookmark destination

You can navigate to a desired bookmark destination using the GotoBookmark(PdfBookmark) method. The target/destination bookmark should be provided as the parameter to this method. Refer to the following code sample.

//Create an object for PdfLoadedDocument
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(documentStream);

//Retrieves the bookmark collection from the loaded PDF document
PdfBookmarkBase bookmark = loadedDocument.Bookmarks;

//Navigates to the specified bookmark destination
pdfViewerControl.GoToBookmark(bookmark[0]);

See Also