[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Collapse]PDF Viewer
   [Expand]Getting Started
    Coordinate Systems
   [Expand]Access and Edit Document Content
     Document Rotation
     Cursor Modes
     Search for a Specific Text
     Adjust the Zoom Level
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Search for a Specific Text

The PDF Viewer allows you to search for a word (words) or any set of characters in a document.

To search for a specific text, do the following:

  • Click the Find button on the toolbar or press Ctrl+F;

    This invokes the Find dialog.

    To invoke the Find dialog using the context menu, right-click the document and select the Find item in the context menu.

    To invoke the Find dialog in code, call the overloaded PdfViewer.ShowFindDialog method.

  • In the Find dialog, type the text you want to search for and specify the following settings (if required):

    • The Case Sensitive option specifies whether to ignore the letter case when searching text.

    • The Whole Words Only option only considers whole words when searching text. For example, it does not find the word types when you search for type.

  • To start searching, click the Next button in the Find dialog, or press the ENTER key when the PDF Viewer shows the Find dialog.

    The PDF Viewer stops searching when it finds the first occurrence of the search text, highlights the occurrence and navigates to the highlighted text.


    If a part of the word is searched, the PDF Viewer highlights whole words that contain the word part.

    For example, let's take the following sentence: "The DevExpress PDF Viewer control displays PDF files directly in your application without the need to install an external PDF Viewer on your end user's machine". if you search for the word character p (the Case Sensitive option is disabled) in this sentence, the words DevExpress, PDF, displays, PDF, application, and PDF are highlighted sequentially in the order these words appear in the sentence.

    To search for the next match, click the Next button in the Find dialog, or press the ENTER key again when the PDF Viewer shows the Find dialog.

    To go to the previous match, click the Previous button.

    The PDF Viewer shows the following message when it finds the final occurrence of the search text or there were no results that match the search text:

To find text in a document programmatically, call the PdfViewer.FindText method. This method has 3 overloads, depending on your search criteria.

To change the default visibility behavior of the Find dialog, handle the PdfViewer.FindDialogVisibilityChanged event.

Is this topic helpful?​​​​​​​