PdfViewerBookmarkExtensions.FindBookmark(IEnumerable<PdfViewerBookmark>, Func<PdfViewerBookmark, Boolean>) Method
In This Article
Finds a bookmarks that meets the specified criteria.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v24.2.Core.dll
NuGet Package: DevExpress.Pdf.Core
#Declaration
public static PdfViewerBookmark FindBookmark(
this IEnumerable<PdfViewerBookmark> bookmarks,
Func<PdfViewerBookmark, bool> predicate
)
#Parameters
Name | Type | Description |
---|---|---|
bookmarks | IEnumerable<Pdf |
A list of bookmarks where to search. |
predicate | Func<Pdf |
An object that defines a set of criteria for the bookmark. |
#Returns
Type | Description |
---|---|
Pdf |
The target bookmark. |
#Remarks
The code sample below shows how to find a bookmark with a specific title:
using DevExpress.Pdf;
using DevExpress.XtraPdfViewer;
//...
pdfViewer.DocumentChanged += pdfViewer_DocumentChanged;
private void pdfViewer_DocumentChanged(object sender, PdfDocumentChangedEventArgs e) {
var bookmark = pdfViewer.Bookmarks.FindBookmark(x => x.Title == "4 Notation");
if (bookmark != null) {
pdfViewer.GoToBookmark(bookmark);
}
}
See Also